Base64 Encoder / Decoder

About the Base64 Encoder / Decoder

Base64 is a way of representing binary or text data using only 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). It shows up constantly in web development: embedding images directly in CSS or HTML, encoding credentials in an Authorization header, attaching files to emails, or passing binary data through systems that only understand text.

This tool encodes plain text into Base64, and decodes Base64 strings back into their original text, instantly and entirely in your browser.

How it works

Common use cases

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not an encryption scheme — it has no secret key and anyone can decode it instantly. Never use Base64 alone to protect sensitive data; it only changes the representation of the data, not its confidentiality.

Why does my Base64 output end with = signs?

The = characters are padding, added when the input length isn't a multiple of 3 bytes, so the encoded string's length is always a multiple of 4. Some systems (like JWTs) strip this padding — that's called Base64URL and is slightly different from standard Base64.

Can I encode files, not just text?

This tool works on the text you paste in. For binary files, most programming languages have a built-in Base64 function (e.g. `btoa`/`atob` in JavaScript, `base64` module in Python) that reads the file bytes directly.

Why did decoding fail with an error?

The input isn't valid Base64 — it likely contains characters outside the Base64 alphabet, or is missing padding. Double-check you copied the full string without extra whitespace or line breaks.

This tool runs entirely in your browser — nothing you enter is sent to a server. Read more in the Privacy Policy, or browse the full list of tools.