Code · Made a little simpler

Base64 to file

Decode standard or URL-safe Base64, including a Base64 data URL, into a file on your device. Choose the download name and inspect the decoded size before saving.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Base64 to file: how to use it

  1. Paste Base64 text or a Base64 data URL.
  2. Choose a file name and decode the input.
  3. Check the decoded size and download the file.

Limits and notes

Up to 16777216 UTF-16 code units of raw input, counted before trimming or removing a data-URL header and supported whitespace, and 12582912 decoded bytes (12 MiB). Surrounding whitespace is trimmed; within the Base64 payload, only ASCII space, tab, line feed, carriage return and form feed are ignored; padded and unpadded standard or URL-safe alphabets are accepted. Mixed alphabets, invalid padding, non-zero trailing pad bits and non-Base64 data URLs are rejected. The download uses a binary content type; files are not opened, previewed or executed. A filename extension does not convert the decoded content to a different format.

How your privacy works →

Base64 to file: common questions

Does choosing .png convert my file to an image?

No. Base64 only encodes bytes. Choose an extension matching the original content; changing the name cannot change those bytes.

Is my Base64 sent anywhere?

No. Validation, decoding and downloading happen locally in the current browser tab.

How do I save Base64 as a file?

Paste the complete value, choose a filename and press Decode file. Check the decoded byte count, then select Download file. Decoding and saving are separate actions.

Can I use URL-safe Base64 or omit padding?

Yes, when the value is valid under the supported rules. Standard and URL-safe forms are accepted, with correct padding or without padding. Mixing their special symbols, malformed final groups and nonzero pad bits are rejected.

Tool guides