About this tool
Decode a Base64 string or data URL back into a PDF, preview it, and check its version, page objects, encryption and trailer.
Base64 to PDF decodes a Base64 payload — raw, or wrapped in a `data:application/pdf;base64,` URL — back into a working PDF file and inspects its structure. It verifies the `%PDF-` header and version required by ISO 32000-1 §7.5.2, looks for the `startxref` pointer and closing `%%EOF` marker that mark a complete file, and reports encryption, linearization and visible page objects. It is for developers debugging an invoice API, a signed document webhook, or an email attachment that arrives as a string.
Open Base64 to PDF on AltFTool — it loads instantly in your browser.
Paste the payload into the 'Base64 PDF data' box — raw, or a full data:application/pdf;base64,… URL. Every real PDF starts with %PDF-, which is always JVBERi0 in Base64, the box opens with a one-page sample already in it, and the limit is 40 MB decoded.
There is no convert button: the decode runs as you type. The Decoded PDF panel renders the file in your browser's own PDF viewer, and the table reports PDF version, Decoded bytes, Base64 characters, Encoding overhead, Page objects found, Encrypted, Linearized (fast web view), Interactive form, Ends with %%EOF and Document title — flagging a missing cross-reference table or %%EOF marker as a probable truncation.
Once satisfied, click Download PDF to save the decoded file as decoded-document.pdf, use Copy data URL or Copy summary for the clipboard, or press Reset to restore the sample PDF.
Header, startxref and %%EOF are all verified, so a truncated payload is caught before you download it.
The decoded file renders in the browser's own PDF viewer from a blob URL, so you see the pages immediately.
Decoding uses the browser's built-in `atob`; the document is never uploaded, which matters for contracts and payslips.
Check the first seven characters: every PDF begins with the bytes `%PDF-`, which always encode to `JVBERi0` in standard Base64. If the string starts with anything else it is not a PDF — `iVBORw0KGgo` is a PNG and `JVBERi0xLjc` specifically means PDF 1.7.
The usual cause is truncation: the Base64 was cut off, so the cross-reference table and the closing `%%EOF` marker are missing. ISO 32000-1 requires both, and this tool flags their absence. The other common cause is that the string was double-encoded — Base64 of Base64 — in which case the decode produces the text `JVBERi0...` rather than binary.
By exactly 33%, plus up to two padding characters: Base64 maps every 3 bytes onto 4 ASCII characters. A 1 MB PDF becomes roughly 1.33 MB of text, which is why APIs that return documents inline are usually capped at a few megabytes.
It counts objects marked `/Type /Page` in the raw bytes, which is exact for classic PDFs. From PDF 1.5 onwards the page tree can live inside a compressed object stream (`/ObjStm`), where those tokens are not visible without full decompression — in that case the tool reports the count as hidden rather than guessing a wrong number.
Add the Base64 to PDF widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/base64-to-pdf"
title="Base64 to PDF — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/base64-to-pdf?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>