Developer Tools
Base64 Encoder
Encode text to Base64. Unicode is handled properly — the browser's own `btoa` throws on anything outside Latin-1, which is why so many online encoders fail on accented text and emoji.
URL-safe swaps + and / for - and _ and drops the padding
Encoding is not encryption
How to use this tool
- Type or paste the text you want to encode.
- Choose standard Base64, or URL-safe if the result will go in a URL or a JWT.
Formula and method
3 bytes of input → 4 Base64 charactersBase64 maps every three bytes onto four printable characters, which is why encoded data is about 33% larger than the original. Padding with = keeps the output a multiple of four.
Notes and limitations
- Base64 is an encoding, not encryption. It provides no secrecy whatsoever and anyone can decode it instantly. Never use it to protect a password, a token or personal data.
- Text is converted to UTF-8 bytes before encoding, so accented characters, emoji and non-Latin scripts all round-trip exactly.
- URL-safe Base64 replaces + and / with - and _ and drops the = padding, because those characters have meaning inside a URL. JWTs use this variant.
- Encoded output is roughly a third larger than the input. That overhead is the reason not to Base64 large files unnecessarily.
- Everything runs in your browser and nothing is uploaded. That said, treat any third-party website with caution when handling production data — if a value would cause real damage if leaked, process it with your own local tooling instead.
Frequently asked questions
Is Base64 encryption?
No, and treating it as such is a genuine security mistake. It is a reversible encoding designed to move binary data through text-only channels. Decoding takes one step and no key.
Why do other encoders break on emoji?
Because they call btoa directly, which only accepts characters below 256 and throws on anything else. Converting the text to UTF-8 bytes first, as this tool does, handles any character.
What is URL-safe Base64?
A variant using - and _ in place of + and /, with the padding removed. Those two characters are reserved in URLs, so the standard alphabet has to be escaped when used in one.
Why does the = at the end matter?
It pads the output to a multiple of four characters, which tells the decoder how many bytes the final group represents. Some decoders can infer it, but many require it.
Related tools
- Base64 DecoderDecode Base64 to text, standard or URL-safe.
- URL EncoderPercent-encode text for URLs, by component or whole address.
- JWT DecoderDecode a JWT to inspect its header, payload and claims.
- JSON FormatterFormat JSON with indentation and pinpoint syntax errors.
- JSON ValidatorCheck JSON syntax and see exactly where an error is.
- JSON MinifierStrip whitespace from JSON and see the bytes saved.