Base64 Encoder & Decoder — Text and Files

Encode and decode Base64 for UTF-8 text and any file, including the URL-safe variant. Free, no sign-up, and your files never leave your device.

Free, with no sign-up and no watermark. The file is processed in your browser and never uploaded.

Encode text or any file to Base64, or decode Base64 back. Text is handled as UTF-8, so emoji and non-Latin scripts (Hindi, Chinese…) round-trip correctly — something the browser's built-in btoa() gets wrong. A URL-safe option uses - and _ and drops padding, as used in JWTs and URLs.

Step by step

  1. Choose Text or File: Text converts as you type; File encodes any file, or decodes Base64 into a downloadable file.
  2. Choose Encode or Decode: Decoding accepts standard or URL-safe Base64 and even full data URIs.
  3. Optional: URL-safe: Tick it when encoding for URLs, filenames or tokens.
  4. Copy or download: For files, Decode & download file detects common file types (PNG, JPG, PDF, ZIP…) to name the file correctly.

Handy for

Data URIs

Embed small files in HTML, CSS or JSON.

APIs

Send binary data in JSON bodies.

Debugging

Decode Base64 values from logs, headers or tokens.

Email and certificates

Inspect Base64 attachments or PEM bodies.

Good to know

  • Base64 makes data about 33% larger — it is an encoding, not compression.

  • Base64 is not encryption: anyone can decode it.

  • For images, Image to Base64 also gives ready-made HTML and CSS snippets.

Questions

Why do I get "not UTF-8 text" when decoding?

The Base64 contains binary data (an image, PDF…). Switch Input type to File and decode it to a downloadable file instead.

Is my data sent anywhere?

No. Everything is processed by JavaScript in your browser tab — nothing you paste or open is uploaded, logged or stored on a server. You can even use the tool offline once the page has loaded.

Further reading

More Developer Tools tools

  • Image to Base64 Converter — Convert images into Base64 data URIs with ready-to-paste HTML and CSS snippets.
  • Base64 to Image Converter — Paste a Base64 string or data URI to preview the image, detect its type and download it.
  • URL Encoder & Decoder — Percent-encode or decode URLs and components, and break query strings into an editable table.
  • HTML Entity Encoder & Decoder — Escape text into HTML entities (named or numeric) and decode entities back to characters.
  • JWT Decoder & Verifier — Decode a JWT's header and payload with readable claims, and optionally verify its signature locally.
  • Hash Generator — Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes or HMACs of text and files.

All Developer Tools tools