Encoder workbench

Base64, URL escapes, HTML entities and raw bytes, both directions, as you type. Nothing you paste here goes anywhere. Not even to us.

IN TEXT
OUT BASE64

Type on the left and the right side keeps up.

BASE64 ENCODE 0 -> 0 BYTES

Base64, done in bytes

Your text becomes UTF-8 bytes first, and those bytes become base64. That matters. The browser's built-in btoa only accepts characters up to 255, so btoa("é") works by accident, btoa("€") throws, and btoa("😀") throws too. Encoding the bytes instead of the string is the fix, and it is what every other language does anyway.

base64url swaps + and / for - and _ and drops the = padding, so the result is safe in a URL or a filename. It is what JWTs use. Decoding accepts either alphabet, ignores whitespace, and forgives missing padding.

Files are read by your browser and never uploaded. Encode one and you get a data URI with its MIME type, ready to paste into an src or a stylesheet. Paste base64 in the other direction and download the bytes as a file; if it came with a data URI prefix the type is kept.

Alphabet
Direction

The arrow between the panes does this too, and carries the output across with it.

What stays here

Everything on this page is plain JavaScript in your browser: TextEncoder for the bytes, btoa and atob over those bytes for base64, encodeURIComponent and encodeURI for URLs, an inert text field for entities. There is no server doing the work, so there is nothing to send it to. Your text and your files are not stored, not logged, and are gone when you close the tab. The only thing this page records is that an encoding happened, and on which tab.

The options, the tab and the direction are remembered in this browser so the bench is set up the way you left it. The text is not.