Skip to content

Base64

Encode and decode Base64 in both directions, from text or a file. It handles UTF-8 correctly — accents and emoji survive the round trip — and offers the URL-safe variant used in JWTs and query strings.

# processed in your browser. no request leaves this page.

How it works

Conversion uses the browser TextEncoder together with btoa/atob. Plain atob breaks on anything outside Latin-1, so the tool converts to UTF-8 bytes before encoding, which is what virtually every language expects.

  • Text to Base64 and Base64 to text, with automatic detection
  • URL-safe variant (+ becomes -, / becomes _, no padding)
  • File to data URI, ready to paste into CSS or HTML
  • Tells you when the input is not valid Base64 instead of returning garbage

Other tools

See all tools →