Base64 encoder and decoder
Encode text to Base64 and decode it back, with full UTF-8 support, or turn a file into a data URI. Everything runs in your browser.
Runs in your browser. Nothing you enter is uploaded.
About this tool
This tool encodes text to Base64 and decodes Base64 back to text, using UTF-8 so accented letters and emoji survive the round trip. The decoder also accepts the URL-safe alphabet (- and _), missing padding, line breaks and a data: prefix. Picking a file gives you the whole file as a data URI.
- Why does decoding fail on some Base64 strings?
- The decoder expects the bytes to be valid UTF-8 text. Base64 of an image or other binary data is rejected with an error instead of being shown as broken characters.
- Can I decode a JWT part or a Base64URL value here?
- Yes. The - and _ characters are mapped to + and / before decoding, and missing = padding is accepted.