Tools
Base64 Encoder / Decoder
Encode and decode between multiple formats including file support. Drop images, audio, documents, or any file to get its Base64 representation. Everything runs locally in your browser.
...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 do I use it?
Switch between Text and File mode using the tabs
- In Text mode: paste text and select input/output encoding formats
In File mode: drop a file or click to browse, then copy the Base64 output
- Toggle the Data URI prefix for ready-to-use CSS/HTML embedding
- Use the Download button to save decoded Base64 back as a file
Is my data private?
All encoding and decoding happens entirely in your browser. No files are uploaded to any server. Your data never leaves your device.
How do I do this from the Linux terminal?
You can achieve the same operations from the terminal using built-in Linux tools. Here are the most common examples:
Text ↔ Base64
Files ↔ Base64
Data URI for CSS / HTML
Other Encodings
Verify Integrity
Frequently asked questions
Is Base64 a form of encryption?
No. Base64 is an encoding scheme, not encryption. It makes binary data safe to transmit as text but provides no confidentiality, since anyone can decode it instantly. Never use it to protect secrets.
What is the difference between Base64 and Base64URL?
Standard Base64 (RFC 4648) uses + and / characters plus = padding, which can break inside URLs. Base64URL replaces them with - and _ and usually drops the padding, making it safe for URLs and JWTs.
Is my data uploaded to a server when I encode a file?
No. All encoding and decoding runs entirely in your browser. Files you drop are never uploaded, so your data never leaves your device.
Why is my Base64 output larger than the original file?
Base64 represents every 3 bytes of input as 4 ASCII characters, so the output is roughly 33% larger than the source data. This is expected overhead for any Base64 encoding.
What is a Data URI and when should I use it?
A Data URI embeds the Base64-encoded content directly inside CSS or HTML using a data:<mime-type>;base64,... prefix, avoiding a separate file request. Enable the Data URI toggle to get a ready-to-paste string for small assets like icons.