Base64 Encoder and Decoder

Encode text to Base64 or decode Base64 back to text. Handles Unicode, emoji and the URL-safe variant.

Updated September 2026 Formulas tested

Quick answer: Base64 turns any data into 64 safe characters (A to Z, a to z, 0 to 9, + and /) by encoding every 3 bytes as 4 characters, so the result is about a third larger. The word “Man” becomes TWFu, and “Hello, world!” becomes SGVsbG8sIHdvcmxkIQ==. It is an encoding, not encryption.

Base64 is a way of writing any data using only 64 safe characters: letters, digits, plus and slash. Developers meet it constantly, in email attachments, data URLs, API tokens, configuration files and web authentication headers, because it lets binary or unusual characters travel through systems that only handle plain text.

Choose encode or decode, paste your input, and the result appears as you type. It works with any language and emoji, and it can produce the URL-safe form used in web addresses and tokens.

How Base64 works

Base64 takes the data three bytes (24 bits) at a time and splits it into four groups of six bits. Each group is a number from 0 to 63, written as one character from A–Z, a–z, 0–9, + and /. If the data does not divide evenly into three bytes, one or two = signs are added at the end as padding.

The URL-safe variant replaces + with - and / with _, and usually drops the padding, so the result can sit inside a link or file name without being escaped.

Base64 is not encryption. Anyone can decode it in a second, so never use it to hide passwords or secrets. It is only an encoding, a way of representing data. It also makes data about a third larger.

A worked example

Example. “Hello, world!” encodes to SGVsbG8sIHdvcmxkIQ==. The Hindi word “नमस्ते” encodes to 4KSo4KSu4KS44KWN4KSk4KWH, because the text is first turned into UTF-8 bytes and then into Base64.

How the padding works

TextBytesBase64Why the ending differs
Man3TWFuExactly one group, so no padding
Ma2TWE=One = fills the last group
M1TQ==Two = fill the last group
Hello5SGVsbG8=Two groups, one = of padding

Every 3 bytes become 4 characters. If the data does not divide into groups of 3, = signs pad the end.

Common mistakes to avoid

  • Treating Base64 as security. Anyone can decode it instantly, so never use it to hide passwords or tokens.
  • Forgetting text encoding. Non-English text must be converted to UTF-8 bytes first, which this tool does for you.
  • Mixing the standard and URL-safe alphabets. URL-safe Base64 uses - and _ instead of + and /, and often drops the = padding.

Frequently asked questions

Is Base64 a form of encryption?

No. It is a reversible encoding that anyone can decode without a key. Do not use it to protect sensitive data.

Why does my decoded text look like random symbols?

The Base64 probably contains binary data such as an image, a zip file or encrypted bytes, not text. This tool shows a message when it decodes to something that is not valid text.

What are the = signs at the end?

Padding. Base64 works in blocks of four characters, and = fills up the last block when the data length is not a multiple of three bytes. The URL-safe form often leaves them out, and this decoder accepts both.

Is my data uploaded?

No. Encoding and decoding happen in your browser and nothing is sent anywhere.

People also search for this as: Base64 decode online, Base64 encode text, Base64 converter, URL-safe Base64, decode Base64 string, Base64 to text.

Sources and further reading

Formulas on this page are checked by automated tests against independent references. See how we test our tools.

Press Esc to close