BASE64 · DEV

Text to Base64, both ways.

Base64 is the encoding to fit binary data into text-only places: emails, URLs, JSON, CSS. Paste text, get Base64. Paste Base64, get text. Works on small files too — useful for data URLs in CSS or HTML.

Input

Your content never leaves your browser.

0 characters

Replaces + with - and / with _, and drops the = padding. Used by JWT and APIs.

Result

Output

The result shows up here…

File to Base64

Drop a file and get its Base64 and data URL. Up to ~10 MB. All local.

What it does

  • Encode and decode both ways, instantly
  • Full UTF-8 (accents, ñ, emojis)
  • URL-safe mode (- and _ instead of + and /)
  • Drop a file and get its data URL
  • Auto-detection of valid vs invalid input
  • Quick copy of result

Use cases

  • Inline images in CSS as data:URL
  • Basic Auth authorization headers
  • URL tokens without problematic chars
  • Decode a JWT (the payload part)
  • Inspect binary content in a dump

FAQ

Why does btoa() break on accents?

btoa() only accepts ASCII (0–255). For UTF-8 you have to encode to bytes first with TextEncoder, then to Base64. We do it automatically.

What's URL-safe Base64?

Variant replacing + with - and / with _ (which break URLs), and dropping the = padding. Used by JWT and many modern APIs.

Safe to paste a secret here?

Base64 is NOT encryption, just encoding. Anyone with the result trivially decodes it. If your "secret" is just Base64, consider it public.

Max file size?

Up to ~10 MB comfortably. Above that the browser may stall — use a CLI like base64 for big files.