Encoding

Base64 Encoder / Decoder

Encode text to Base64 or decode it back — including URL-safe Base64. Runs entirely in your browser, so whatever you paste never leaves your machine.

Text in
Base64 out

What is Base64?

Base64 is a way to represent binary data using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It exists because many systems — email headers, URLs, JSON, HTTP basic auth — were built for text and will mangle raw bytes. Encoding to Base64 lets binary travel safely through a text-only channel.

How it works

Base64 takes 3 bytes (24 bits) at a time and splits them into 4 groups of 6 bits. Each 6-bit group (0–63) maps to one character in the Base64 alphabet. Because 3 input bytes become 4 output characters, Base64 is always about 33% larger than the original. When the input isn’t a multiple of 3 bytes, the output is padded with = so its length stays a multiple of 4.

Standard vs URL-safe

Base64 is encoding, not encryption

Anyone can decode Base64 — this page does it with one click. It provides no confidentiality. Never use Base64 to “hide” secrets; use real encryption for that. Its job is safe transport of bytes, not security.

FAQ

Why is my Base64 longer than the input?

Every 3 bytes become 4 characters, so the encoded form is ~33% larger. That overhead is the cost of being text-safe.

What are the = signs at the end?

Padding. They keep the output length a multiple of 4 when the input length isn’t a multiple of 3. URL-safe Base64 often omits them.

Is anything uploaded?

No — encoding and decoding run in your browser, so your text stays local and the tool works offline.

Related

Decoding a token? A JWT is three Base64URL parts — use the JWT decoder. Learn more in the Reference, including memory leaks and OOP concepts.