Base64 Encoder and Decoder

Paste text or drop a file. This tab picks encode or decode and uses UTF-8 instead of btoa. Größe becomes R3LDtsOfZQ==. Encoding is not encryption.

The bytes stay in this tab. Mixpanel sees the knobs, not the paste.

Paste text, or drop a file. The rows update as you type.

Direction
Alphabet

This link carries auto direction, auto alphabet, no wrap, and plain Base64. It does not carry the paste.

btoa and a German ß

I typed Größe in this sitting. TextEncoder produced the bytes 71, 114, 195, 182, 195, 159, 101. This tab encoded those bytes as R3LDtsOfZQ==. btoa on the same string did not match that. In this environment it returned a different latin-1 reading. That is the usual miss: a name, a city, a German noun goes into btoa, and the round trip is garbage.

Decode uses TextDecoder with fatal set. A bad UTF-8 sequence is named. It is not shown as a replacement character. A NUL byte is bytes, not a text box. AA== is one zero. Download that. A form that stops at the first empty character will eat it.

Encode or decode, said out loud

Four letters like aaaa could be text or Base64. The page waits. You pick Encode or Decode. It will not print a huge result until you do. Padding is a marker: R3LDtsOfZQ== decodes. Characters outside the alphabet encode. A data URI that contains ;base64, decodes.

You can override. Auto is the default. RFC 4648 "foo" is Zm9v. "f" is Zg==. Missing padding on Zg is valid here: the tab adds two equals signs and says so. Zg=== is an error. One leftover character cannot be a byte group.

Files and a data URI

Drop a PNG and the tab sniffs 89 50 4E 47, then writes data:image/png;base64,... The image renders here so you can see it before you copy the string. A file over 20,000,000 bytes is refused. That cap is 20 MB SI, counted in this sitting. For a photo you want in a page, shrink it first on Compress Image to Exact KB. Inlining a 2 MB photo as a data URI is how a stylesheet becomes a download.

The first 8,192 characters of a long result show on the page. The rest is a download. Putting 20 MB into a textarea locks the tab. A file over about 256 KB encodes in a worker, with a progress number and a cancel. Cancel is checked per chunk, not only at the start.

URL alphabet and wrap 76

JWT segments and some filenames use Base64URL: hyphen and underscore instead of plus and slash, padding often dropped. Pick URL. MIME likes a newline every 76 characters. That is wrap 76. Both knobs stay in this browser. They do not go out with the paste.

Mixpanel and Google Analytics load with the rest of Softery.io. They see that someone opened the tool. They get the knob names, a size bucket, and whether a copy or a download happened. They do not get the paste. If you came here because a privacy page promised zero third-party scripts, that is not this site, and I will not write that sentence.

Encoding is not encryption

Anyone who has this tab can reverse what you just did. Base64 is an alphabet for bytes, the same job as hex. A password encoded here is still the password. A private key encoded here is still the key. The conversion runs in this tab. That is not a lock.

If the decoded bytes look like JSON, take them to JSON Formatter and Validator. Format and the line that broke live on that page. This one stops at the alphabet.

Common questions

Does this page send the text I pasted?

No. Encode and decode run in JavaScript here. After the page has loaded you can unplug the cable and still go from Größe to R3LDtsOfZQ==. Mixpanel and Google Analytics load with Softery.io. They see that someone opened the tool, which knobs moved, and whether a copy happened. They do not get the paste.

Why did it encode instead of decode?

It looked at the characters. ß sits outside the Base64 alphabet, so Größe encodes. A padded string like R3LDtsOfZQ== decodes. Four letters like aaaa could be either, so the page waits. You can force Encode or Decode.

Is Base64 encryption?

No. Base64 is an alphabet for bytes, the same job as hex. Anyone who has this tab can reverse what you just did. A password encoded here is still the password. If you need a lock, this page is not it.

Where do the settings live?

Direction, alphabet, wrap and the data URI switch are stored in this browser under softery.base64-encoder-decoder.settings. The paste is not stored. Copy link puts those knobs in the URL. It does not put the text in the URL. Clear the site data, or hit Clear settings, and the knobs go back to Auto.

Nearby tools

Decoded JSON belongs on JSON Formatter and Validator. A photo you are about to inline belongs on Compress Image to Exact KB. Both stay in the tab.

Looking for something else?