{Asad Webs}
← Toolz / Developer Tools / Base64 Encoder / Decoder
DEV·04

Base64 Encoder / Decoder

Base64 is an encoding, not encryption — anyone can decode it. Files and text are processed on your device only.

Text — encode / decode


File → Base64


Base64 → file

Encode text or files to Base64 and decode Base64 back — UTF-8 safe, with a URL-safe variant, file download and clear errors. Everything runs on your device.

100% free · No sign-up · No daily limits · No watermarks · Processed in your browser — files never leave your device

UNDERSTAND YOUR RESULTS

Base64 Encoder / Decoder — Text & Files in Your Browser guide

Encode text or files to Base64 and decode Base64 back — UTF-8 safe, with a URL-safe variant, file download and clear errors. Everything runs on your device.

How to use this tool

  1. For text, type or paste into the box and choose Encode or Decode. Unicode — accents, emoji, other scripts — is handled correctly, not mangled into question marks.
  2. Tick URL-safe when the result will live inside a URL or a filename: it swaps + and / for - and _ and drops the padding.
  3. For a file, choose it and the tool produces its Base64, ready to copy or download as a .txt file. Keep files modest — Base64 inflates size by about a third.
  4. To turn Base64 back into a file, paste it into the decode-to-file box, give the output a name and extension, and download the reconstructed file byte for byte.

A worked example

The text "Asad ✓" encodes to QXNhZCDinJM= — note the checkmark survives the round trip, which naive encoders break. And a 90 KB logo becomes about 120 KB of Base64 text, ready to paste into an email template, a CSS file or a data URI.

How it works

Encoding follows RFC 4648: the input is read as bytes (text is converted to UTF-8 first, which is why symbols survive), grouped in threes and mapped onto the 64-character alphabet, with = padding rounding the output to a multiple of four. Decoding reverses the process and validates as it goes — misplaced padding or foreign characters produce a specific error message, not silent garbage. Files are read as bytes locally; nothing is uploaded anywhere.

Frequently asked questions

Is Base64 the same as encryption?

No. Base64 simply re-represents bytes using printable characters; there is no key, and anyone can reverse it instantly — the decoder on this very page does it. Use Base64 for transport and embedding, never for secrecy.

Why does my text decode to gibberish in other tools?

Usually an encoding mismatch: if text contains anything beyond plain ASCII and a tool treats it as Latin-1 instead of UTF-8, multi-byte characters shatter. This tool treats text as UTF-8, the modern standard, so accents, scripts and emoji survive the round trip.

What is the URL-safe variant?

Standard Base64 uses + and /, which mean other things inside a URL. The URL-safe alphabet (RFC 4648 section 5) substitutes - and _ and usually omits the padding, so the value can travel inside links and filenames without escaping.

How big a file can I convert?

Comfortably a few megabytes on a desktop. The limit is your device’s memory, because the file, its Base64 (a third larger) and the copy buffer may all be held at once. For large media files, Base64 is rarely the right tool anyway.

Why did decoding fail with an error?

The input was not valid Base64. Common causes: a truncated paste, a chunk missing from the middle, or leftover characters from a label or a quote. A data-URI prefix (data:image/png;base64,) is stripped automatically — so check the middle of the string for a missing piece.