Base64 File Decoder
Decode Base64 or data URL back into a binary file. Handles URL-safe, line-wrapped, and padded Base64. MIME detection, magic bytes verification, hex preview, custom filenames, batch decode. 100% client-side.
About Base64 File Decoder
Decode Base64 or data URL back into a binary file. Handles URL-safe, line-wrapped, and padded Base64. MIME detection, magic bytes verification, hex preview, custom filenames, batch decode. 100% client-side. Everything runs locally in your browser — your data never leaves your device.
How to use
- Enter your input in the tool above.
- Adjust any options to your preference.
- Use the Copy or Download buttons to save the result.
- Everything happens locally — your data never leaves your browser.
FAQ
How does Base64-to-file decoding work?
Paste your Base64 string or data URL. The tool strips whitespace/newlines (line-wrapped Base64), converts URL-safe characters (-_ → +/) back to standard form, then decodes using atob into raw bytes. You can download the result as a binary file with the correct extension.
How is the MIME type detected?
If the input is a data URL (data:<mime>;base64,...), the MIME is read from the prefix. Otherwise the tool inspects the first 8 bytes of the decoded output against a magic-byte database (PNG, JPEG, PDF, ZIP, etc.) to guess the format.
What extra features does this tool have?
10 extras: (1) Drag-drop .b64 file. (2) Batch decode multiple inputs. (3) Hex preview of decoded bytes (first 256). (4) File size info (input chars + output bytes). (5) MIME type detection from data URL or magic bytes. (6) Magic bytes verification (shows matched signature). (7) Stats (input length, output size, overhead reversed). (8) Copy decoded bytes as hex. (9) Custom output filename. (10) History (localStorage — last 10 decodings).
Is my Base64 data uploaded anywhere?
No. All decoding runs in your browser using atob. Your data never leaves your device.
Why does my decoded file look corrupted?
Common causes: (1) input is not actually Base64 (e.g. a raw text string), (2) padding is missing, (3) URL-safe characters weren't converted. This tool handles all three cases automatically, but if you still see garbage, check the magic bytes — if they don't match a known signature, the input is likely not Base64-encoded binary.
Related tools
7Z Extractor
Inspect and extract files from 7z archives. Detects the 7z signature (0x37 0x7A 0xBC 0xAF 0x27 0x1C), parses the SignatureHeader and StartHeader, lists files from the archive metadata, and extracts STORE-method files when possible. Honest about LZMA compression limitations. 100% client-side.
APK Extractor
Extract and inspect Android APK files in the browser — pure JavaScript APK (ZIP) parser. View AndroidManifest.xml (binary XML detection), list DEX files, resources, and assets, extract individual files, detect app info (package name, version) from manifest. 100% client-side.
ARJ Extractor
Inspect ARJ archives. Detects the ARJ magic (0x60 0xEA), parses header structures, lists file entries with sizes and CRCs, and extracts STORE-method files when possible. Honest about ARJ compression limitations. 100% client-side.