fixmint

Encode or decode Base64

Paste text or drop a file. Base64 is made or decoded as you type, and decoded images show a preview.

  • Runs on your device
  • No sign-up
  • Works offline
Direction

How to encode or decode Base64

  1. Choose Encode or Decode, then paste the text or the Base64.
  2. Or drop a file to get its Base64, or a data: URL when that option is ticked.
  3. Copy the result or download it. Decoded images show a preview you can save.

Questions

What is Base64 for?

It turns bytes into text made of A–Z, a–z, 0–9, + and /, so binary data such as an image can travel inside text formats like email, JSON, HTML and CSS. Every three bytes become four characters, so the result is about a third longer than the original.

Why not just use btoa() on the text?

Base64 works on bytes, and btoa() only accepts characters up to U+00FF, so it fails on a tick (✓) or a Chinese character. This tool first turns the text into UTF-8 bytes, so “héllo ✓” becomes 10 bytes and encodes to aMOpbGxvIOKckw==. Decoding reverses that. Bytes that do not read as text, such as a ZIP file, are offered as a download.

What is URL-safe Base64?

The standard alphabet uses + and /, which have a meaning in URLs. The URL-safe form (RFC 4648, section 5) uses - and _ instead and drops the = padding. Decoding accepts either form, with or without padding.

Are my files uploaded?

No. Your browser reads the file and converts it there. Nothing is uploaded or stored.

Read more