Base64 to PDF
Sometimes a PDF arrives as a long block of Base64 text: inside an API response, an email's source, a JSON file or a database export.
What Base64 to PDF does
Sometimes a PDF arrives as a long block of Base64 text: inside an API response, an email's source, a JSON file or a database export. Base64 to PDF turns that text back into the real document so you can open it, check it and save it.
Paste plain Base64 or a full data:application/pdf;base64 link. Spaces and line breaks are ignored, and the URL-safe variant that uses - and _ is accepted. The tool checks the first bytes of the decoded data, so if the text actually holds a picture or some other file, it tells you instead of handing you a broken PDF.
How to use Base64 to PDF
- Copy the Base64
Copy the encoded text from wherever it is stored, with or without the data: prefix.
- Paste it in
Put it into the Base64 text box. Extra spaces and line breaks are fine.
- Press Decode
The tool rebuilds the file and shows its type and size.
- Save the PDF
Download decoded.pdf, or open the preview to look through it first.
Questions about Base64 to PDF
Why does it say this Base64 isn't a PDF?
Every PDF begins with the characters %PDF. If the decoded data begins with something else, the text holds a different kind of file, or its start was lost when it was copied. Try Base64 to file to see what it really is.
Can I decode a Base64 string from an API or JSON?
Yes. Copy only the value between the quotes and paste it. A leading data:application/pdf;base64, part is removed for you.
Is the decoded PDF uploaded?
No. Decoding happens in your browser, and the PDF is created on your device.
Will the PDF open if the Base64 is incomplete?
Usually not. Missing = padding at the end is added automatically, but if part of the text itself is missing, the PDF inside will be damaged.