Skip to content
</>Inblix Dev ToolsAll tools

Base64 Encoder and Decoder Online

Convert text to Base64 and back. Unicode is handled correctly, so non-Latin characters survive the round trip rather than turning into mojibake.

How it works

Base64 is an encoding, not encryption. Anyone can read what you produce with it, and it is trivially reversible. Do not use it to protect a password, an API key, or anything else sensitive — it provides no confidentiality whatsoever.

The interesting problem is Unicode. Base64 operates on bytes, but text in a browser is UTF-16 code units. Naive implementations encode the code units rather than the underlying bytes, which corrupts anything outside ASCII — accented characters, emoji, and non-Latin scripts all come back wrong. This tool encodes UTF-8 bytes explicitly, so a string round-trips exactly.

Base64 output is 33% larger than the input, plus padding. That expansion is inherent to the scheme, which maps 6 bits onto an 8-bit character because it wants to use only printable ASCII. If size matters, compress first and then Base64 the result.

Decoding validates its input. Characters outside the Base64 alphabet, or a padding run in the wrong place, produce an error rather than a string full of replacement characters, so a corrupt payload is visible instead of silently mangled.

A common use is embedding binary data in a JSON payload or an HTTP header, neither of which tolerate arbitrary bytes. Another is carrying small credentials in a URL-safe form — though for that, Base64url is the correct variant because standard Base64 uses + and /, both of which need escaping in a URL.

Use the Base64 Encoder and Decoder

Base64
Paste text on the left to see the result.

Try an example:

Runs entirely in your browser — nothing you paste is uploaded or logged.

Worked examples

Real input and the exact output this page produces.

Example 1

Text

                      Hello, world!
                    

Base64

                      SGVsbG8sIHdvcmxkIQ==
                    

Example 2

Text

                      héllo → 世界
                    

Base64

                      aMOpbGxvIOKGkiDkuJbnlYw=
                    

Frequently asked questions

Is Base64 encryption?

No. It is an encoding and is trivially reversible by anyone. Never use it to protect secrets.

Does it handle Unicode?

Yes. Text is encoded as UTF-8 bytes first, so accented characters, emoji, and non-Latin scripts round-trip correctly.

Can I use the output in a URL?

Not safely as-is. Standard Base64 uses + and /, which need escaping. Use a Base64url variant for URL contexts.

Others doing similar work.