Base64 to File Decoder
Paste a Base64 string or data URL and download the decoded file.
Paste a raw Base64 string or a full data URL (data:mime/type;base64,...) to decode and download the original file. Everything runs locally in your browser.
Last updated:
Turn Base64 back into a real file
This Base64 to file converter decodes a Base64 string or a data: URL and downloads the original file. Use it when an API, JSON payload, database field or email gives you a file as text and you need the actual PDF, image or document.
How to decode Base64 to a file
- Paste the Base64 string or the full data URL (for example
data:application/pdf;base64,JVBERi0...). Spaces and line breaks are removed automatically. - If you pasted a data URL, the file type is detected for you. For a raw string, choose the file type from the list.
- Enter a file name without the extension.
- Click Decode & Download.
Supported file types
The correct extension is added for 29 common types, including:
- Documents: PDF, DOCX, DOC, XLSX, PPTX, TXT, CSV, JSON, XML, HTML
- Images: PNG, JPG, GIF, WebP, SVG, BMP, ICO
- Audio and video: MP3, WAV, OGG, MP4, WebM
- Other: ZIP, JavaScript, CSS, TTF, WOFF, WOFF2
Any other data downloads as a generic .bin file.
How to tell what file a Base64 string contains
The first characters often reveal the type: JVBERi is a PDF, iVBORw0KGgo is a PNG, /9j/ is a JPEG, R0lGOD is a GIF and UEsDB is a ZIP-based file (ZIP, DOCX, XLSX or PPTX).
Private and fast
Decoding happens in your browser, so the file is never uploaded to a server — safe for invoices, IDs and other private documents.
Frequently asked questions
Why does it say the input is not valid Base64?
The string may be cut off, contain characters outside the Base64 alphabet, or be URL-safe Base64 (using - and _). Copy the full value again and make sure nothing is missing at the end.
Can I convert a file to Base64 instead?
Yes — use the File to Base64 encoder for the reverse direction.
Related Developer Tools
Browse all tools from the same category.
Domain Authority Checker
Check Moz authority, page authority, spam score, and backlink metrics
Open toolSEO Audit Tool
Audit a website URL for technical SEO, metadata, headings, broken internal links, hreflang, canonical and X-Robots-Tag checks, with report exports
Open toolShowing 1-2 of 49