Base64 Encoder & Decoder
Encode and decode Base64 strings.
About the Base64 Encoder / Decoder
Convert text to Base64 and back - for tokens, data URIs, basic-auth headers and API payloads.
- Paste text into the input editor, or click Load Sample.
- Click Encode to turn it into Base64, or Decode to turn Base64 back into text.
- Copy the result from the output editor.
- Click Clear to start again.
- Base64 is an encoding, not encryption - anyone can decode it, so never use it to hide secrets.
- Encoded text is about a third larger than the original.
- Learn more in Base64 encoding explained.
Encode and Decode Base64 Online
Base64 represents any data using 64 plain ASCII characters, so it can travel through systems that only handle text. Paste text to encode it, or paste Base64 to get the original text back.
How Base64 works
- Three bytes become four characters, which is why encoded text is about a third longer.
- The alphabet is
A-Z,a-z,0-9,+and/. - Padding: one or two
=characters at the end fill the last group when the input length isn't a multiple of three. - Unicode: text is converted to UTF-8 first, so accents, non-Latin scripts and emoji survive the round trip.
Where Base64 is used
- HTTP Basic authentication headers
- Data URIs that embed images or fonts in HTML and CSS
- Binary values carried inside JSON or XML
- Email attachments (MIME)
Base64 FAQ
Is Base64 a form of encryption?
No. It is an encoding with no key, and anyone can reverse it. Never rely on it to protect passwords or other secrets.
Why does decoding fail?
Usually for one of three reasons: the input contains characters outside the Base64 alphabet, it uses the URL-safe variant (replace - with + and _ with / first), or it decodes to binary data such as an image and not to text.
Does it handle emoji and non-English text?
Yes. Text is encoded as UTF-8 before conversion, and decoded the same way.
Is my data uploaded to a server?
No. Encoding and decoding run entirely in your browser.