Skip to content
anyutil.io

Base64 encoder and decoder

Turn text into base64 and back, in your browser.

Accents and emoji are fine, the text is converted to UTF-8 first.

Base64 is not encryption, only another way of writing the same data: anyone can read it back. It is no place for passwords or personal details. The conversion runs in your browser, nothing is uploaded.

More about Base64 encoder and decoder

What base64 is and what it is for

Base64 writes arbitrary data using 64 characters that survive anywhere only text is expected: in email, in JSON, in data URLs or in HTTP headers. Three bytes become four characters, so the result is about a third longer than the original data.

The equals signs at the end are padding that rounds the length up to a multiple of four. Our decoder adds them for you, so even a truncated JWT segment goes through.

Base64url for addresses

The characters “+” and “/” mean something of their own in a URL, which is why the base64url variant exists: it swaps them for “-” and “_” and drops the padding. JWT, OAuth and most APIs use it. The switch turns it on.

Frequently asked questions

Is base64 encryption?

No. It is only another way of writing the same data, and anyone can read it back in a second. Do not use it to protect passwords, personal details or the contents of a contract.

Why did it mangle my accents?

Older tools work with bytes 0 to 255 and cannot cope with accented letters. Our encoder converts the text to UTF-8 first, so “ř”, “ñ” and emoji all survive the round trip untouched.

Can it handle an image or a file?

This tool works with text. With images only a limited size fits into a text box; for larger data a command-line tool is the better choice.

Related tools