Tools › Build › Base64 Encoder / Decoder
🔤

Base64 Encoder / Decoder – Text, URL-safe & Files

Encode text or files to Base64 and decode Base64 back to text or a downloadable file. UTF-8, URL-safe and data-URI aware — nothing leaves your browser.

✅ 100% Private
⚡ Live Results
🔗 URL-safe & MIME
→

Encode to Base64

Type or paste text — the result updates instantly.

UTF-8 text · emoji and all languages supported0 characters
Encoded output
←

Decode from Base64

Paste Base64 — standard, URL-safe or a data URI.

Spaces, line breaks and missing = are handled0 characters
Decoded output
Decoded image preview
Advertisement

How to use

  1. To encode, type or paste text in the left box (or click File). The result appears instantly.
  2. To decode, paste Base64 — or a data: URI — in the right box.
  3. Use Copy for text, or Download file when the decoded data is binary.
  4. Tick URL-safe or Remove padding for tokens and URLs.

What is Base64?

Base64 is an encoding that turns any data — text, images, files — into a string of 64 safe characters (A–Z, a–z, 0–9, + and /), with = used for padding. It lets binary data travel through systems that only handle text: email attachments (MIME), JSON and XML, URLs, HTML/CSS data URIs, HTTP Basic authentication headers and JWT tokens.

Base64 is not encryption. Anyone can decode it, so never use it to hide passwords or secrets.

Standard vs URL-safe Base64

Standard Base64 uses + and /, which have special meaning in URLs. URL-safe Base64 (RFC 4648 §5) swaps them for - and _ and often drops the = padding — this is the form used inside JWTs. Tick “URL-safe” and “Remove = padding” to produce it. The decoder accepts both forms automatically.

Common uses for developers

  • Decode a JWT payload or an API response field.
  • Create the Authorization: Basic header value from username:password.
  • Embed small images as data URIs (see Image to Base64).
  • Inspect Base64 blobs from logs, cookies and config files.

Frequently asked questions

Is Base64 encryption?

No. Base64 is a reversible encoding with no key. Anyone can decode it instantly, so it provides no security. Use real encryption (such as AES) if you need to protect data.

Is my data sent to a server?

No. Encoding and decoding happen entirely in your browser. Nothing you type or upload leaves your device, and the page keeps working offline once loaded.

Why does Base64 make data bigger?

Every 3 bytes of input become 4 characters of output, so Base64 is about 33% larger than the original. Line wrapping (MIME) adds a little more.

Does it support emoji and non-English text?

Yes. Text is converted to UTF-8 before encoding, so Hindi, Tamil, Chinese, Arabic, emoji and every other script round-trip correctly. This is different from the plain btoa() function, which fails on non-Latin characters.

Why does decoding say “Invalid character” or “incomplete”?

The text contains a character that is not part of Base64, the = sign is in the wrong place, or part of the string was cut off. Copy the full value again; spaces and line breaks are ignored automatically.

What if the decoded result is not readable text?

Then the Base64 holds binary data such as an image, PDF or zip file. The tool tells you so and offers “Download file” to save it. Paste a data URI like data:image/png;base64,… to see an image preview.

How do I decode a JWT?

A JWT has three Base64URL parts separated by dots. You can decode any part here, or paste the whole token into the JWT Decoder for a formatted header, payload and expiry.