Base64 Encoder / Decoder

Turn any text into Base64, or decode Base64 back into readable text.

your-result-here

0 characters in · 0 characters out

How to use this Base64 encoder

Paste or type any text into the box and pick a mode. The result updates as you type. Use "Encode to Base64" when you need a text-safe version of some text, for example to paste it into a config file or an email header. Use "Decode from Base64" when you have a string of letters, digits, plus signs and slashes that ends in = and you want to read what it says. Use the URL-safe modes when the result has to live inside a web address or a token, because they swap + and / for - and _ and drop the padding. Copy the result with one click.

What is Base64?

Base64 is a way of writing binary data using only 64 safe text characters: the letters A-Z and a-z, the digits 0-9, plus + and /. It takes every 3 bytes of input and turns them into 4 characters, which is why the output is about a third longer than the input. When the input length is not a multiple of 3, one or two = signs are added at the end as padding so the decoder knows where the data stops. The text "Hello world" becomes SGVsbG8gd29ybGQ=, and the Arabic word السلام becomes 2KfZhNiz2YTYp9mF. Nothing about the meaning changes. The same text is just written in a form that can travel through systems built for plain text.

Base64 vs Base64URL

Standard Base64 uses + and /, which both have special meanings inside a web address, and it pads the end with =. That is fine for email and config files, but it causes trouble in URLs and tokens. Base64URL fixes that with two small changes.

VariantCharacters 62 and 63PaddingUse it for
Base64+ and /= at the endEmail attachments, data URLs, config files
Base64URL- and _Usually left outTokens, JWTs, values inside a URL

The two variants hold the same data, so converting between them is only a matter of swapping two characters and adding or removing the padding. Do not mix them up when you decode. Feeding a URL-safe string to a standard decoder, or the other way round, is one of the most common reasons decoding fails.

Why it matters

Some systems only accept plain text. Email was built for text, so an attachment has to be written as text before it can be sent. A web address can only hold a small set of characters safely. A JSON config file cannot hold raw binary at all. Base64 is the bridge that lets binary data cross those text-only systems without being changed on the way. It also shows up in places you touch every day without noticing: the login header your browser sends, the token that keeps you signed in, and the tiny image embedded in a page as a data URL. Knowing how to read it turns a wall of gibberish into something you can check in seconds.

Frequently asked questions

What is Base64 encoding?

It is a way of writing binary data as plain text, using 64 characters: A-Z, a-z, 0-9, + and /. Every 3 bytes of input become 4 characters of output, so the result is about a third longer than the original.

Is Base64 encryption?

No. Base64 hides nothing. Anyone can decode a Base64 string in seconds, with no key and no password. Never use it to hide a password, a secret or a token you want to keep private. It is a transport format, not a lock.

Why does Base64 output end with = signs?

The = signs are padding. Base64 works in groups of 3 input bytes, and when the last group is short, padding marks how many bytes are missing so the decoder can rebuild the original exactly. One = means the last group held 2 bytes, two == means it held 1 byte.

What is the difference between Base64 and Base64URL?

Base64URL replaces + with - and / with _, and usually drops the = padding, so the result is safe inside a web address. Standard Base64 keeps + and / and the padding. Use Base64URL for tokens and URLs, and standard Base64 everywhere else.

Why is my Base64 string longer than the original?

Base64 stores 6 bits per character instead of 8, so it needs 4 characters to carry 3 bytes. The output is always about 33 percent longer than the input. That extra size is the price of making binary data safe for text-only systems.

Is it safe to paste text here?

Yes. The tool runs entirely in your browser. Nothing you type is sent to a server, stored, or logged. Keep in mind that Base64 itself is not private, so do not share an encoded secret and assume no one can read it.

Read the guide

Where Base64 Shows Up and What It Does

More free tools

URL Encoder / Decoder · Password Generator · Text Case Converter