Processed on your device

Base64 encoder and decoder

Encode text as Base64, or decode Base64 back to UTF-8 text.

1

Make it yours

To decode, replace the example with Base64 such as SGVsbG8=.
No uploads

Ready when you are. Nothing runs until you choose.

2

Your result

Your result will appear here.

About Base64 encoder and decoder

Use this to put text where only plain ASCII is accepted, such as a data: URL, an HTTP Basic authorization header or a test fixture. It also reads such a value back. Direction chooses the job: Encode text to Base64 turns your text into Base64, and Decode Base64 to text shows what a value from a configuration file, an email source or an API response says. Text is handled as UTF-8, so accented letters, Sinhala, Tamil and emoji survive the round trip.

How it works

To encode, StillKit turns your text into UTF-8 bytes and writes each group of 3 bytes as 4 characters from the standard alphabet: A to Z, a to z, 0 to 9, + and /. When needed, 1 or 2 = signs pad the end. To decode, it removes spaces and line breaks, checks the alphabet, the length (a multiple of 4) and the padding, then reads the decoded bytes strictly as UTF-8 text.

Tips

  • Base64 is an encoding, not encryption. Anyone can decode it, so it does not hide passwords or keys.
  • The decoder rejects unpadded and URL-safe Base64. Change - to + and _ to /, then add = until the length divides by 4.
  • For a URL or a JWT segment, turn an encoded result into base64url: replace + with -, / with _ and remove the = padding.
  • Remove a prefix such as data:text/plain;base64, before decoding. Only the encoded part is accepted.
  • If well-formed Base64 still fails to decode, its bytes are not UTF-8 text but, say, an image. Save them with Base64 to file; File to Base64 encodes a file.
GOOD TO KNOW

Limits

Maximum 1 MB of input. Decoding needs standard Base64 with = padding, and the decoded bytes must be UTF-8 text. Base64 is an encoding, not encryption.

How tools run on your device →

Questions and answers

Why does my Base64 end with = or ==?

The = signs fill the last group of 4 characters when the byte count does not divide by 3. hello is 5 bytes, so it becomes aGVsbG8= with 1 sign.

Why does another encoder give a different result for the same text?

Usually it used a different text encoding. Here é is encoded as its 2 UTF-8 bytes and becomes w6k=, while an encoder working in Latin-1 writes 6Q==.

How much longer is Base64 than the original text?

About a third. Every 3 bytes become 4 characters, so 300 bytes of UTF-8 text give 400 characters. Characters outside basic English take 2 to 4 bytes each, which adds to the total.

How do I turn Base64 back into text?

Set Direction to Decode Base64 to text and paste the value in place of the example. The output of the encoder is accepted as it is, including the = padding.

Find your next shortcut

Search loads only when needed. Your search stays on your device.

Browse all categories and sections →