DevLearningTools

TOOLS · BASE64

Encode or decode Base64, instantly.

Paste in plain text to get Base64, or paste in a Base64 string to get the original text back. Everything happens on your device.

What Base64 Actually Is

Base64 is a way of representing binary data using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It doesn't compress or encrypt anything — it just re-encodes bytes into a text-safe form, which is why Base64 output is always about 33% larger than the original.

It exists because a lot of older systems — email, for one — were only ever designed to carry plain text safely. Binary data like images or attachments would get corrupted in transit, so Base64 became the standard way to smuggle binary content through text-only channels.

How This Tool Works

Encoding and decoding both happen using your browser's built-in btoa() and atob() functions. Nothing you paste in is sent to a server — it's converted locally and stays on your device.

Common Uses

  • Embedding small images directly in CSS or HTML as data: URIs, avoiding an extra network request.
  • Encoding credentials for HTTP Basic Authentication headers.
  • Reading the payload of a JWT (JSON Web Token) — the header and payload segments are Base64-encoded JSON.
  • Passing binary-ish data through systems (like URLs or JSON fields) that only reliably handle plain text.

Frequently Asked Questions

Is Base64 a form of encryption?

No. Base64 is encoding, not encryption — there's no secret key involved, and anyone can decode it instantly. Never rely on Base64 alone to protect sensitive data.

Why is the Base64 output longer than my input?

Each group of 3 bytes gets turned into 4 Base64 characters, so encoded text runs about 33% larger than the original — that overhead is the tradeoff for representing binary data as plain text.

Can I Base64-encode a file, not just typed text?

This tool works on the text you paste in. Encoding actual binary files (images, PDFs) typically happens automatically when you use a data: URI or an API that accepts file uploads — the underlying technique is the same Base64 encoding shown here.