Loading tool…
Loading tool…
Convert any file to Base64 (or Data URL) and decode Base64 back into a downloadable file — all in your browser. No data is uploaded to a server.
Was this tool useful?
Does this tool upload my files or Base64 data to any server?
No. All encoding and decoding happens entirely inside your browser. Your files, Base64 output, previews, and decoded downloads never leave your device and are not stored anywhere.
Why is the Base64 output much larger than the original file?
Base64 encoding increases file size by about 33%. This is normal because binary data is converted into text using a 4:3 expansion ratio. Very large files will produce extremely long Base64 strings.
Can I convert any file type to Base64?
Yes. Any file can be converted. The tool reads the file as a Data URL, extracts the MIME type, and generates Base64 text. Images, PDFs, ZIP files, videos, and all other formats are supported.
How does the tool detect file type when decoding Base64?
The tool uses magic-byte analysis on the decoded bytes to identify common formats such as PNG, JPG, GIF, PDF, ZIP, and MP4. If no known signature is found, it falls back to the MIME type in the data URL or defaults to application/octet-stream.
What is the difference between Base64 only and Data URL output?
Base64 only provides the raw Base64 string, ideal for APIs, JSON, and compact storage. Data URL includes the full prefix `data:<mime>;base64,...` which is useful for embedding images or files directly into HTML, CSS, or documents.
Why does decoding large Base64 sometimes warn that the browser may freeze?
Extremely large Base64 strings require heavy memory and string processing. Browsers may slow down, freeze, or crash. The tool warns you if the input exceeds 15 million characters so you can avoid accidental decode attempts.
Can I decode a Base64 string that is a full data URL?
Yes. The tool automatically detects data URLs such as `data:image/png;base64,...` and extracts the MIME and Base64 payload before decoding.
What happens if the Base64 text contains invalid characters?
The tool validates the characters and will show an error if the input contains anything outside A–Z, a–z, 0–9, +, /, =. Invalid or incomplete Base64 strings cannot be decoded.
Why does the decoded file automatically download?
After decoding Base64 into binary, the tool creates a Blob URL and triggers an automatic download with a safe filename. If no extension is provided, the tool attempts to infer one from the detected file type.