Home › Tools › Base64 Encoder & Decoder
Base64 Encoder & Decoder
Convert text to Base64 and back. Accented characters, emoji and non-Latin scripts are handled correctly rather than producing garbled output.
100% private — everything runs in your browser, nothing is ever uploaded.
What this tool does
An email header arrives as a long Base64 string, or an API expects a value encoded so that binary-looking bytes survive a text-only channel. Base64 is not encryption and it is not compression; it is simply a way to write arbitrary bytes using safe printable characters. This tool encodes text to Base64 and decodes it back, with correct UTF-8 handling so accented characters, emoji and non-Latin scripts round-trip intact instead of turning into mojibake. A URL-safe option swaps the two characters that cause trouble in query strings and file names. It is commonly used for reading data URLs, checking an Authorization header, preparing a value for a config file, or understanding what a short opaque string in a log actually contains before deciding whether it is sensitive.
How to use it in three steps
- Paste the plain text you want to encode, or paste the Base64 string you want to read back, into the input box.
- Tick URL-safe when the result will go into a URL, a query parameter or a file name, so the plus and slash characters are replaced with safe alternatives.
- Press Encode or Decode, then copy the result. If decoding looks like nonsense, check that the input is actually Base64 and not a hash or an encrypted blob. Check the decoded output for readable text before assuming the string is an encoded value rather than a token or a digest.
Questions people ask
Is Base64 a way to hide a password?
No. Anyone can decode it instantly, and this tool does exactly that. It is an encoding for transport, not protection. Never put a secret into Base64 and assume it is safe; use proper encryption and access control instead.
Why do accented characters sometimes come out garbled elsewhere?
Base64 encodes bytes, so the text must first be converted to UTF-8 and back with the same convention. This tool handles that step explicitly, which is why a name with accents or an emoji survives a round trip unchanged.
When should I use the URL-safe option?
Use it whenever the encoded value appears in a URL or a file name. Standard Base64 contains plus and slash, which a URL parser or a filesystem can interpret specially; the URL-safe variant uses hyphen and underscore instead.
Why is the encoded string longer than the original text?
Base64 represents three bytes with four printable characters, so the output is roughly a third larger. It buys safe transport through text-only channels, not compression; a large file will produce an even larger string, which is why it is used for small values.
Privacy: Encoding and decoding happen entirely in this browser tab; whatever you paste, including internal tokens, email headers and personal text, is never uploaded, logged or retained on a server.
How to use it
- Paste the text you want to encode, or the Base64 you want to decode.
- Tick URL-safe if the output is going into a URL or a filename.
- Press Encode or Decode, then copy the result.
Why it stays private
Base64 is often the last step before something sensitive is embedded — an API key in a config file, a token in a header, a password in a connection string. Decoding it in a local page rather than a remote service keeps that value off the network.
Questions
What is Base64 for?
It represents arbitrary binary data using only 64 printable characters, so it can be carried safely through systems that only handle text — email, JSON, HTTP headers, XML and URLs. It is an encoding, not encryption: anyone can reverse it.
What does the URL-safe option do?
Standard Base64 uses + and /, both of which have special meanings in URLs, and pads the end with =. The URL-safe variant substitutes - and _ and drops the padding.
Why did my non-English text come out garbled on another site?
Because those tools encode the raw characters instead of their UTF-8 bytes. This one encodes the UTF-8 bytes first, which is what almost every modern system expects, so accented letters, emoji and CJK text round-trip correctly.
Is Base64 encryption?
No, and treating it as one is how secrets leak. Base64 is a public alphabet rearrangement: anything encoded with it can be decoded by anyone in milliseconds, with no key involved. A configuration value like YWRtaW46cGFzc3dvcmQ= is password-protected in the same sense that a gift box is locked — the ribbon is not a lock. If a credential is Base64-encoded in something you received, assume it is readable and treat it accordingly.
Why does Base64 make my file bigger?
Every 3 bytes of input become 4 characters of output, so the size grows by about a third, plus padding. That is the price of squeezing arbitrary bytes through an alphabet that only has 64 safe characters, and it is why Base64 should be a last resort for large payloads — sending the raw bytes, or compressing first, is always cheaper.