Base64 to File Converter
Paste Base64 in and get a real file back. Missing padding, stray line breaks and data: URL prefixes are cleaned up for you, and the original file type is recovered from the file header โ you do not need to know what the file was.
Processed as you paste โ no button to press (Ctrl+Enter converts now / Esc clears)
Drop a file here, or โ Ctrl+V a screenshot works too
Any file type ยท 100 MB maximum
Paste, drag and drop, or Ctrl+V a screenshot
What gets fixed automatically
- Missing padding โ trailing
=characters are restored - Line breaks and spaces โ wrapped output from email or MIME is joined back together
- data: URL prefixes โ
data:application/pdf;base64,and friends are stripped - Base64URL alphabet โ
-and_are mapped back to+and/ - Byte-order marks โ a stray BOM at the start is removed
- JSON wrappers โ an API response is scanned for embedded
fileContentfields
Supported file types
The type is read from the first bytes of the decoded data, not from a file name โ so the output arrives with the right extension and opens with the right app.
Images (PNG, JPEG, GIF, WebP, BMP, SVG), PDF, Word (.docx), Excel (.xlsx), PowerPoint (.pptx), ZIP, RAR, 7z, MP3, WAV, MP4 and plain text.
When you do not know the original file name
Base64 rarely carries a file name โ only the bytes. The tool still recovers the type from the header and suggests a sensible name, so the download opens correctly. If the content came from a JSON API response with a fileName field, use extract files from JSON instead: it reads the original names too.
Frequently asked questions
Can I convert without knowing the file type?
Yes. The type is detected from the decoded bytes, so you can paste Base64 with no context at all and still get a file with a correct extension.
The restored file will not open โ why?
Usually the Base64 was truncated when it was copied: the decoded bytes run out mid-file. Compare the length against the source, or grab the data programmatically instead of copy-pasting. See decode errors.
Are data: URL prefixes supported?
Yes. A full data URL is accepted, the prefix is stripped and the MIME type is kept for naming the output.