Which file tool do I need
| Your task | Tool |
|---|---|
| Any file to Base64, several at once | File to Base64 |
| Base64 of unknown type back to a file | Base64 to file |
| PDFs for APIs, e-signature services and email | PDF to Base64, Base64 to PDF |
| Archives | ZIP to Base64, Base64 to ZIP (lists the files inside) |
| Word, Excel, PowerPoint | Word to Base64, Base64 to Word, Excel to Base64, Base64 to Excel, Base64 to PowerPoint |
| Audio from a speech or TTS API | Base64 audio player, Base64 to MP3, Base64 to WAV |
| Audio to Base64 | Audio to Base64, MP3 to Base64, WAV to Base64 |
| Video | Video to Base64, MP4 to Base64, Base64 to video, Base64 to MP4 |
| Web fonts in CSS | Font to Base64 (writes the @font-face rule), Base64 to font |
The decoders preview what the browser can show: PDFs in the browser’s PDF viewer, audio and video with a player, fonts with sample text, the file list of a ZIP, the text of a DOCX, the first sheet of an XLSX and the slide text of a PPTX. Each one also shows the SHA-256 of the decoded bytes, so you can compare it with a checksum from the sender.
Recognizing a file from its first characters
| Base64 starts with | File type |
|---|---|
JVBERi0 | PDF (%PDF-) |
UEsDBA | ZIP, and every ZIP-based format: DOCX, XLSX, PPTX, ODT, EPUB, JAR, APK |
SUQz | MP3 with an ID3 tag |
//s to //v | MP3 frame without an ID3 tag (FF FB) |
UklGR | RIFF: WAV audio, or a WebP image |
T2dnUw | Ogg (Vorbis or Opus audio) |
AAAAGGZ0eXA, AAAAIGZ0eXA | MP4, M4A, MOV (ftyp box) |
GkXfo | WebM or Matroska |
d09GMg, d09GRg | WOFF2, WOFF |
AAEAAA, T1RUTw | TrueType, OpenType font |
H4sI | gzip, handled by the gzip decoder |
A Base64 string that begins with none of these may still be a file in a less common format, or text. Base64 to file tries the full list of signatures, and if the bytes turn out to be text it shows that instead.
Practical notes
- APIs and JSON: most services expect plain Base64 without a
data:prefix and without line breaks. The encoders default to that; switch the output to a data URI only for browsers and HTML. - Email attachments are Base64 wrapped at 76 characters. To read the attachments of a raw message, use the email decoder.
- Mismatched types: a decoder page for one format still saves other formats, and it warns when the content does not match. A “PDF” that starts
UEsDBAis a ZIP. - Big files: encoding works in chunks, and the text preview is shortened above 4 MB. Download always saves the complete result; very large output can only be saved, not copied.
For pictures, the image tools add resizing and format conversion, and the text tools cover strings and charsets.
FAQ
How do I convert Base64 to a file when I do not know the type?
Paste it into Base64 to file. It reads the first bytes, names the format (PDF, ZIP, PNG, MP3 and many more), shows a preview where the browser can and suggests the right extension for the download.
Is there a size limit for files?
There is no upload, so the limit is your device’s memory. Large files are encoded in chunks; above roughly 48 MB the Base64 can no longer be copied to the clipboard and is saved as a .txt file instead.
Why is my Base64 file a third larger than the original?
Base64 stores 3 bytes in 4 characters, so the encoded size is about 133% of the file, plus line breaks if the output is wrapped. The size calculator gives the exact length for any file size.