Developer

Base64 Encoder / Decoder

Live Base64 encode/decode with auto-detect on paste. Also Base32, Hex, Binary, Octal, file encode, URL-safe mode, and Data URIs. UTF-8 safe — runs entirely in your browser.

🔒 100% private. Encoding stays in this browser — nothing is uploaded.

Input

Drop a file to encode it

Output

The result appears here as you type.
Convert now Ctrl+Enter
Options URL-safe, padding, MIME line wrap, text encoding

Decoding accepts both the standard and URL-safe alphabets, missing padding, line breaks, and data:…;base64, prefixes.

What is this tool?

This Base64 encoder and decoder converts text or files to Base64 and back, with the input and output side by side. Developers use it for API payloads, email attachments, data URIs and debugging encoded strings. Auto mode checks what you paste and picks encode or decode, live as you type. Paste a data: URI and the prefix is stripped for you. Decoded bytes are checked for their file type (PNG, JPEG, PDF, ZIP, MP4 and more), so you can preview images, read a hex dump, and download with the correct extension. Options cover URL-safe output, no padding, MIME line wrapping at 76 characters, CRLF line endings, one conversion per line, and decoding text as UTF-16, Windows-1252, Shift-JIS and other character sets. The Base32, Hex, Binary and Octal tabs work the same way. Everything runs in your browser, and nothing is uploaded.

How to Use

  1. Pick Base64, Base32, Hex, Binary or Octal, then type or paste into Input, or drop a file onto it.
  2. Leave the direction on Auto to encode or decode as you type, or choose Encode or Decode.
  3. Read the result in Output. Decoded files show their detected type, a Hex dump view, and an image Preview when the data is a picture.
  4. Open Options for URL-safe output, no padding, MIME line wrapping, LF or CRLF line endings, or the character set used to show decoded text.
  5. Copy the result, or Download it. Decoded files are saved with the right extension, such as decoded.png.

Frequently Asked Questions

Why is my Base64 output about 33% larger than the input?

Base64 represents every 3 bytes as 4 characters, so encoded data grows by about a third. The size readout shows the exact ratio.

What is URL-safe Base64?

It replaces + with - and / with _ so the string can go in URLs and filenames without escaping. It is often used with No padding, as in JWTs. The decoder accepts both alphabets.

Why did Auto encode my text instead of decoding it?

Auto decodes only when the input is valid Base64 with no spaces and the result is readable UTF-8 text. Otherwise it encodes. Choose Decode to force decoding.

How do I decode Base64 to an image or file?

Paste the Base64 or the whole data: URI. The tool detects the file type from its first bytes, shows image previews, and Download saves it with the right extension.

Other tools

There are more calculators, converters and editors on Wivrix. If something is missing, tell us.