Base64 File Encoder & Decoder
NEWBase64 file encoder: turn any file into Base64 or a data URL, or decode Base64 back into a downloadable file with its type detected. Free, nothing uploaded.
Runs 100% in your browser — your input is never uploaded or stored on our servers.
Drag and drop any file here (max 10.00 MB)
Only need to encode text? Use the Base64 Encoder / Decoder. Embedding images in CSS or HTML? Try Image to Base64.
Quick Examples
Typical inputs and the results this tool produces.
Overview
Base64 writes binary data using only 64 printable characters, which lets you put a file inside JSON, XML, an email, a CSS rule or an environment variable. This Base64 file encoder reads any file you drop on it and gives you raw Base64 or a ready-made data URL with the right MIME type, detected from the file content rather than its extension.
It also works the other way: paste Base64 or a data URL, see what kind of file it is (PNG, JPEG, PDF, ZIP, fonts, audio and more are recognised from their magic bytes), preview images and text, choose a file name and download the original file. Sizes are shown side by side so you can see the roughly 33% Base64 overhead before you embed anything.
Files are read and converted locally in your browser and are never uploaded. The limit is 10 MB per file.
Why use this tool?
- Encode any file type, not just images
- Get raw Base64 or a complete data URL
- Rebuild a file from Base64 and download it
- File type detected from magic bytes
- Files never leave your device
Features
Drag and drop
Drop a file or pick one from your device; up to 10 MB.
Data URL output
Builds data:<mime>;base64,… using the type detected from the file content.
Base64 to file
Decodes standard or URL-safe Base64 and data URLs into a downloadable file with your file name.
Magic-byte detection
Recognises images, PDF, archives, audio, video, fonts, WebAssembly, SVG, JSON and plain text.
Size and overhead
Shows the original size, the Base64 length and the percentage it adds.
Previews
Images and text files are previewed right after encoding or decoding.
How to Use
Pick a direction
File → Base64 to encode, Base64 → File to decode.
Add your input
Drop or choose a file, or paste Base64 / a data URL.
Check type and size
Review the detected type, sizes and preview.
Copy or download
Copy the Base64, download it as .txt, or download the decoded file.