Base64 to File Downloader

Base64 Input

Download File

Paste a Base64 string on the left, then download your file

What is Base64 to File Conversion?

Somewhere in a JSON response sits a field like "invoice": "UEsDBBQ...", and what you actually want is the file it holds. Paste the string here, give the file a name and a type, and download it. That is the whole job of this page.

Raw Base64 and full data URIs both work. With a data URI the type comes from its prefix; with raw Base64 the first bytes are checked for a few common file signatures. Both the standard and the URL-safe alphabets of RFC 4648 are read.

Decoding uses the browser's atob(), and the download is a Blob built in this tab, so the file never passes through a server.

How to Use the Base64 to File Downloader

The string is decoded as you paste it, and the right panel reports the decoded size and MIME type before anything touches your disk. Saving only happens when you ask for it.

1

Paste, Upload, or Load Sample

Paste Base64 into the left Base64 Input panel. If it's a full data URI (data:application/pdf;base64,...), the MIME type is taken from it; for raw Base64, PDF, PNG, JPEG, GIF, WebP, ZIP, MP3 and MP4 are recognised from the first bytes. Click Sample to load example PDF Base64.

2

Set File Name and Type

Type a file name, for example thinkpad-x1-invoice.pdf, and pick the MIME type from the list. If your type is not there, choose Custom and type it in.

3

Download File

Click Download File once the panel shows a size and type. If the name you typed has no dot, an extension is added from the MIME type (.pdf, .png, .docx and so on, or .bin for a custom type). Pressing the trash-can icon empties the input and puts the name back to decoded-file and the type back to PDF.

When You'd Actually Use This

API Response File Recovery

Your order service returns the generated invoice for a Dell Latitude purchase as a Base64 field. Copy the value, paste it here and open the PDF, no script needed.

MIME Email Attachment Extraction

In the raw source of an email, each attachment is a block of Base64 under its own MIME headers. Copy that block, set the type from its Content-Type line and save the file.

Kubernetes Secret Extraction

A TLS certificate stored in a Kubernetes Secret comes out of kubectl as Base64. Paste it, choose a plain-text type, and you have the .crt file back.

Database BLOB Recovery

A JSON export of a table with a BLOB column may write the bytes as Base64. Pull one value out and save it to see what was actually stored.

Common Questions

How do I know which MIME type to use?

If the Base64 comes from a data URI, the MIME type is read from it, and raw Base64 of a PDF, PNG, JPEG, GIF, WebP, ZIP, MP3 or MP4 is recognised from its first bytes. Otherwise, check the API documentation or the original file extension. The IANA media types registry is the authoritative source for MIME types.

What happens if I choose the wrong MIME type?

Nothing breaks. The bytes are saved exactly as decoded; only the extension and the type label are wrong. Rename the file and open it with the right program.

Is my data private?

Yes. atob() turns the string back into bytes and a Blob hands them to your downloads, all inside the tab. The Base64 never travels over the network.

How do I convert a file to Base64?

The File to Base64 page does that: pick a file and copy the string it gives you.

Can I decode URL-safe Base64 (Base64url)?

Yes. Any - and _ characters are turned back into + and / before decoding, so a segment copied from a JWT works as it is.

What if my Base64 has extra whitespace?

That is fine. Spaces, tabs and line breaks are removed before decoding, so Base64 wrapped at 76 characters, the way email writes it, decodes as one string.

Related Base64 Tools

For text, images or PDFs, these pages show the result before you save it: