Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to Unicode text locally.
Your input is not sent to a server. All processing is performed locally in your browser.
Actions
Standard Base64 and UTF-8 text only. Limit: 1 million UTF-16 code units. Base64URL, JWT and files are not supported.
Convert UTF-8 text and Base64
Encode UTF-8 text, including Japanese and emoji, to Base64 and decode Base64 back to valid UTF-8 text.
When this tool is useful
Inspect the Base64 representation of UTF-8 text or decode a received Base64 string during development. Base64 is an encoding format, not encryption or a way to keep information secret.
How to use
- Enter UTF-8 text or standard Base64, up to 1 million UTF-16 code units.
- Choose Encode to Base64 or Decode Base64. Inputs of at least 50,000 UTF-16 code units are processed in a Web Worker; editing cancels the previous conversion.
- Check the converted result. Focus moves to the result on success or the input on error. Unicode code points and UTF-8 byte counts are shown for the result.
- Use Move Result to Input to convert in the other direction. You can undo moving or clearing within 10 seconds.
- Copy the current result. An outdated result cannot be copied until you convert again.
Local processing
TextEncoder, TextDecoder with strict UTF-8 validation, and the browser Base64 APIs perform the conversion. Your input is not sent to a server. Large conversions use a Web Worker within your browser.
Encoding preserves input whitespace and rejects malformed UTF-16 rather than silently replacing characters. Decoding ignores whitespace in Base64 input, but rejects input containing only whitespace.
Decoding supports valid UTF-8 text in standard Base64, not Base64URL, JWT parsing, images, or binary files.
FAQ
Can I encode Japanese text?
Yes. Text is encoded as UTF-8, so Japanese text and emoji are supported.
What happens with invalid Base64?
No result is generated and a Base64 format error is shown. Whitespace-only Base64 input receives a separate empty-content message.
What happens with invalid Unicode text?
An unpaired UTF-16 surrogate produces a separate error rather than being silently replaced during encoding.
What happens when the decoded Base64 is not UTF-8?
A separate error explains that the decoded bytes are not valid UTF-8 text.
Can I inspect whitespace or control characters in results?
Yes. The result shows Unicode code-point and UTF-8 byte counts, with a note for whitespace-only or control-character output. Stale results remain visible but cannot be copied or moved until reconverted.
Can I undo moving or clearing text?
Yes, within 10 seconds. Typing or converting again cancels the undo option.
Can I convert long text?
The limit is 1 million UTF-16 code units. Inputs of 50,000 or more run in a Web Worker. Editing, starting a new conversion, or clearing cancels the old conversion. Browsers without Worker support cannot process large input.
Which Base64 formats are supported?
Standard Base64 only. Decoding allows copied whitespace and some omitted padding. Base64URL, JWT parsing and file conversion are not supported.
Is my input sent to a server?
No. Encoding and decoding take place entirely in your browser.