Base64

Encode and decode text or files to and from Base64 online — free, and entirely in your browser.

0 B

What is Base64 encoding?

Base64 converts binary data into a 64-character text alphabet (A–Z, a–z, 0–9, + and /) so it can safely travel through systems built for text — JSON payloads, email (MIME), data URIs in HTML/CSS, and HTTP headers. It's an encoding scheme, not compression or encryption: the output is always about 33% larger than the input, and it can be reversed by anyone.

Typical uses include embedding small images directly in CSS with data: URIs, sending binary attachments over text-only protocols, and encoding the header/payload segments of a JWT.

How to encode and decode Base64 online

  1. On the Encode tab, paste text or drop a file — the Base64 output updates instantly.
  2. Check "URL-safe" if the result needs to go into a URL, filename, or query parameter.
  3. On the Decode tab, paste a Base64 string — the alphabet (standard vs. URL-safe) is detected automatically.
  4. Text output can be copied directly; binary output offers a one-click file download.

Frequently asked questions

What's the difference between standard and URL-safe Base64?

Standard Base64 uses + and / in its alphabet, which have special meaning in URLs and file paths. URL-safe Base64 swaps those for - and _ so the output can be used directly in a URL, filename, or query string without extra encoding.

Can I encode or decode files, not just text?

Yes. Drop a file onto the encode panel (or use the upload button) to get its Base64 representation, and the decoder automatically detects and offers a download when the decoded output is binary rather than text.

Why does my Base64 string end with = or ==?

That's padding. Base64 encodes 3 bytes into 4 characters; when the input length isn't a multiple of 3, one or two '=' characters pad the final group so the output length stays a multiple of 4.

Is Base64 a form of encryption?

No — Base64 is an encoding, not encryption. It has no secret key and provides zero confidentiality; anyone can decode it instantly. Use it to represent binary data as text, never to protect sensitive information.

Can I go straight from Base64 to formatted JSON?

Yes. When decoded text looks like JSON, it appears right below the output already parsed and pretty-printed in an embedded copy of the JSON tool.

Other tools