Input
0 bytes
Output
...
0 bytes

About This Tool

A multi-format encoder and decoder supporting the most common encoding schemes used in web development, APIs, and data exchange. Now with full file support for images, audio, video, documents, and any binary file.

Supported Formats

  • Base64 — standard RFC 4648 encoding
  • Base64URL — URL-safe variant used in JWTs
  • URL Encoding — percent-encoding for URLs
  • Hexadecimal — hex string encoding
  • HTML Entities — HTML character escaping
  • Binary — binary string representation

File Support

  • Images — PNG, JPEG, GIF, WebP, SVG (with preview)

  • Audio — MP3, OGG, WAV (with player)
  • Video — MP4, WebM (with player)
  • Documents — PDF, JSON, plain text, and any other file

How to Use

  1. Switch between Text and File mode using the tabs

  2. In Text mode: paste text and select input/output encoding formats
  3. In File mode: drop a file or click to browse, then copy the Base64 output

  4. Toggle the Data URI prefix for ready-to-use CSS/HTML embedding
  5. Use the Download button to save decoded Base64 back as a file

Privacy

All encoding and decoding happens entirely in your browser. No files are uploaded to any server. Your data never leaves your device.

Linux Command Reference

You can achieve the same operations from the terminal using built-in Linux tools. Here are the most common examples:

Text ↔ Base64

echo -n “Hello, World!” | base64
SGVsbG8sIFdvcmxkIQ==
echo “SGVsbG8sIFdvcmxkIQ==” | base64 —decode
Hello, World!

Files ↔ Base64

base64 -w0 image.png > image.b64
(El comando genera el archivo image.b64 con el contenido en una sola línea)
base64 —decode image.b64 > restored.png
(Restaura el archivo original a partir de su representación Base64)

Data URI para CSS / HTML

echo "data:$(file -b --mime-type logo.png);base64,$(base64 -w0 logo.png)"
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA…

Otras Codificaciones

python3 -c "import urllib.parse; print(urllib.parse.quote('Hello World! á€'))"
Hello%20World%21%20%C3%A1%E2%82%AC
echo -n “Hello” | hexdump -ve ‘1/1 “%.2x”’
48656c6c6f

Verificar Integridad

sha256sum original.pdf base64 -w0 original.pdf | base64 --decode > roundtrip.pdf sha256sum roundtrip.pdf
3fdd704b45cbc536d98c5c7df2636f1a895c7f72a66f3bb5ea2d1daa26eb5e7a original.pdf3fdd704b45cbc536d98c5c7df2636f1a895c7f72a66f3bb5ea2d1daa26eb5e7a roundtrip.pdf
head -c 32 file.b64 | base64 —decode | file -
/dev/stdin: PNG image data, 800 x 600, 8-bit/color RGBA