File ↔ Base64 Converter

Encode any file to Base64 or decode Base64 back to a downloadable file. Supports all file types: PDF, DOCX, ZIP, MP3, MP4, images, JSON, XML, and more. Output as raw Base64 or Data URI. Also see: Image Base64 Converter.
All processing happens locally in your browser — your files are never uploaded to any server.
Direction: Format:
📄
Click to choose or drag & drop a file here
Any file type — Max 10 MB
⚠ Large file (>5 MB). The encoded Base64 will be very long and may slow down your browser.
File Name:-
MIME Type:-
File Size:-
Base64 Size:-
Encoding: File → Base64
Upload or drag & drop any file to encode it to Base64. Output as Raw Base64 or a complete Data URI.
Decoding: Switch direction to decode a Base64 string back to a file — paste any Base64 string or Data URI and download the original file. The file type is auto-detected from magic bytes (PDF, ZIP, PNG, JPEG, MP3, etc.) or from the Data URI MIME type.
URL-safe: Replaces + with - and / with _, and strips trailing = padding.
Supported: Any file type (PDF, DOCX, ZIP, MP3, MP4, images, text, etc.) — Max 10 MB.
Privacy: All processing is done locally in your browser — your files are never uploaded.
Files as Base64 text

Base64 maps every 3 bytes of a file onto 4 printable characters, so the text is about 33% larger than the original bytes. Prefixing it with data:<mime>;base64, turns any file into a self-contained data URI that browsers can open directly.

Because the whole file must be held in memory as text, Base64 suits small and medium files — not multi-hundred-megabyte payloads.