Blog
Image Tools
Crop Image
Resize Image
Rotate & Flip
Compress Image
Photo Filters
Meme Generator
GIF Maker
Collage Maker
Watermark Image
Blur Image
Convert
JPG to PNG
PNG to JPG
HEIC to JPG
DNG to JPG
Image Converter
PDF to JPG
JPG to PDF
Merge PDF
Compress PDF
MP4 to MP3
Video to GIF
MOV to MP4
MP3 Converter
Video & Audio
Trim Video
Crop Video
Remove Audio
Text to Speech
Audio Cutter
MP3 Compressor
Design & Editor
Resume Builder
Design Editor
Add Text to Photo
Social Media Resizer
QR Code Generator
Signature Generator
More Tools
Word Counter
Password Generator
Random Picker
Dice Roller
Spinner Wheel
Favicon Generator
Barcode Generator
Browse All Tools

Base64 to File Converter

Turn Base64 text back into the original file. Paste a Base64 string or a data URI, and the file type is detected from the data itself. Images and text are previewed, and one click downloads the file with the right extension.

100% Free
No Sign-up
Type Detection
Preview
Browser-Based · Private
Base64 to File
Decoded File
Characters—
File Size—
Details—
Type—
Base64—
File—
Details—
Settings forYour Base64
Paste Base64
File Name
.bin
The type and extension are detected from the data.

How to Convert Base64 to a File

Quick answer: paste the Base64 on the right; the file type and a preview appear in the middle. Press Download File.

  1. 1

    Paste the Base64

    Or a data URI, or open a .txt file.

  2. 2

    Check the type

    It is detected automatically.

  3. 3

    Name the file

    The extension is added for you.

  4. 4

    Download

    Get the original file.

What You Get

Type Detection
PNG, PDF, ZIP and more
Previews
Images and text
Any Input
Data URIs too
Right Extension
Added automatically
100% Private
Nothing is uploaded
Any Device
Computer or phone

From Base64 Back to a File

Base64 text often hides a real file: an invoice in a web service response, an image in an email source, a document stored in a database field, or an attachment in a log. This tool decodes the text into the exact original bytes and lets you save them as a normal file you can open.

Automatic Type Detection

Files start with recognisable signatures, and the decoder uses them to identify PNG, JPG, GIF, WebP, BMP and SVG images, PDF documents, ZIP archives (which also covers Word, Excel and PowerPoint files), MP3, WAV and OGG audio, MP4 and WebM video, icons, XML, JSON and plain text. If you paste a data URI, its declared type is used as well. The suggested file name gets the matching extension.

Previews

Images are shown in the middle of the page so you can confirm you have the right picture, and text files show their content. For other types, the detected type and size are displayed. If nothing matches, the file is saved with a .bin extension; rename it if you know the real type.

Example

A support ticket includes a long Base64 block that is supposed to be a screenshot. Paste it here: the decoder detects a PNG image, shows the screenshot and suggests the name image-with today's date. Press Download File and you have the PNG.

Who Decodes Base64 Files?

Developers checking what a web service returned, support teams opening attachments from logs and tickets, testers verifying stored files, and anyone who received a file as text. Decoding in the browser means sensitive documents never leave your computer.

If Decoding Fails

Base64 contains only letters, numbers, + / and =, or - and _ in the URL-safe form. Spaces and line breaks are removed automatically. If you see an error, check that the whole text was copied, including the end, and that no other text, such as quotes or field names, is mixed in.

Related Tools

For images specifically, Base64 to Image shows the dimensions too. For PDFs, Base64 to PDF previews the first page. To encode a file, use File to Base64.

Everyday Scenarios

A developer checks a web service response that returns an invoice as Base64; pasting it here shows a PDF and lets them save it to confirm it opens correctly. A support agent finds a long Base64 block in an error log and discovers it is a screenshot of the problem. A database administrator exports a document stored in a text column and turns it back into a Word file. A tester verifies that an app stores attachments without damaging them by decoding a stored value and opening the result.

The decoded file is identical to the one that was encoded, so it opens in its usual program straight away.

Private, Free and Unlimited

Decoding happens entirely on your device. There is no sign-up, no watermark and no daily limit. Files are processed by your own browser and never leave your device, which makes the tool safe for contracts, photos, ID scans, client work and anything confidential. Close the tab and everything is cleared from memory. It works in current versions of the major browsers on Windows, Mac, Linux and Chromebooks, and on iPhone and Android for smaller files.

Restoring a File From Base64 Text

Files such as PDFs, spreadsheets and images can be written as Base64 text so that they pass safely through systems that only accept plain text. Decoding rebuilds the original file byte for byte.

Knowing what you have

Base64 does not record the file type. The first characters of the string tell you: JVBER is a PDF, UEsDB is a ZIP or an Office document, iVBOR is a PNG and /9j/ is a JPG. Choose a matching extension when saving.

Why it can fail

  • The text is incomplete or has extra characters.
  • The line breaks were changed during copying.
  • The data is URL-safe Base64, which uses a hyphen and underscore.

Treat files from unknown sources with caution. To encode a file, use file to Base64.

Frequently Asked Questions

Questions about Base64 to file

How do I convert Base64 to a file?

Paste the Base64 and press Download File.

How does it know the file type?

It reads the signature at the start of the decoded data, or the type in a data URI.

What if the type is unknown?

The file is saved with .bin; rename it if you know the type.

Does it accept data URIs?

Yes, and URL-safe Base64 too.

Is there a size limit?

Base64 text up to about 70 MB can be decoded.

Are my files uploaded?

No. Everything happens in your browser on your own device. Your files are never sent to a server or stored.