Base64 Encoder / Decoder
Encode and decode Base64 with full Unicode support.
About this tool
Base64 is a way of writing binary data using only 64 safe text characters, so it can travel through systems that expect plain text, such as email, JSON and URLs. Developers meet it in data URIs, API tokens and basic authentication headers. This tool encodes text to Base64 and decodes Base64 back to text. It handles the full range of Unicode, including Hindi and emoji, by converting the text to UTF-8 bytes first, which avoids the errors that the plain browser function causes with non-English characters. You can also choose a file to see its Base64 form; the file is read inside your browser and is not uploaded. Remember that Base64 is encoding, not encryption: anyone can decode it, so never use it to protect secrets.
How to use it
- Choose Encode or Decode.
- Type or paste your text or Base64 string.
- Read the result in the panel below, and copy it with the copy icon.
- For a file, use the file chooser to see its Base64 text.
- If decoding fails, check that you pasted the complete string.
How it works
Encoding converts text to UTF-8 bytes, then groups every three bytes (24 bits) into four 6-bit values, each mapped to one of A-Z, a-z, 0-9, + and /. If the last group is short, = padding is added. The Base64 form is about one third larger than the original data. Decoding reverses the steps and accepts the URL-safe characters - and _.
Example: The text AllFreeTools encodes to QWxsRnJlZVRvb2xz. Decoding QWxsRnJlZVRvb2xz returns AllFreeTools.
Common uses
- Reading or creating a Basic authentication header while debugging an API.
- Embedding a small image in HTML or CSS as a data URI.
- Checking what is inside a Base64 value that appears in a token or config.
Frequently asked questions
Is Base64 encryption?
Why does decoding say invalid?
Does it support Hindi and emoji?
Is my file uploaded?
Why is the output longer than the input?
Related tools
Last reviewed 2026-11-01. Browse all tools