Base64 Converter

Conversion is processed in your browser.

Base64

Plain text

How Base64 encoding works

Diagram of how Base64 encoding works. The plain text "Hello" is split into 3-byte groups "Hel" and "lo", which become the 4-character groups "SGVs" and "bG8=". The trailing "=" is padding for the incomplete group, making the output about 1.33x longer.
Every 3 bytes become 4 characters, which is why Base64 output is about 1.33x longer

Base64 rewrites binary data using only 64 characters — A–Z, a–z, 0–9, + and /. Because 64 is 2 to the power of 6, one character carries 6 bits, so the unit of conversion is the least common multiple of 6 and 8: 24 bits, meaning 3 bytes in and 4 characters out. When the length is not a multiple of 3, the output is padded with =, which is why a trailing equals sign often appears.

Nothing is discarded, only re-spelled, so the result is about 1.33× longer (33% larger) than the input. The exact output length is 4 × ceil(input bytes ÷ 3).

What this tool does

When you would use it

Things to keep in mind

Base64 is not encryption. There is no key involved and the rules are public, so anyone can reverse it. It may look unreadable, but nothing is actually hidden — it is no use for protecting a secret.

Also, this converter records what you enter (the conversion direction and the plain-text side). Please do not paste passwords, private keys or personal data. The scope is described in the privacy policy, and the policy for the site as a whole is on the about page.

Frequently asked questions

How do I switch between encoding and decoding?

There is nothing to switch. Of the two boxes, Base64 on top and plain text below, whichever you typed into last is used as the input. Type into the plain-text box and convert to encode; paste into the Base64 box and convert to decode.

Does Base64 make a file smaller?

No, it grows by about 33%. Base64 rewrites every 3 bytes as 4 characters and has no mechanism for discarding information, so it is not compression. To reduce size, compress with ZIP or gzip first and encode the result.

Can I use Base64 to hide data?

No. There is no key, so anyone who knows the encoding can reverse it. Use real encryption such as AES for anything that must stay secret.

Is there a limit on how much I can convert?

Each box accepts up to 10,000 characters. Everything is processed inside the browser, so pasting something as large as an image file could leave the tab unresponsive, which is why the limit exists.

Read more

Where Base64 came from, where it turns up and how URL-safe Base64 differs are covered in what is Base64? FAQ and guide. Step-by-step instructions and troubleshooting are on how to use, and the other tools and tables are listed on the tool list.