Base64 to PDF
Converter
Decode any Base64 string to a PDF file and preview it directly in your browser. Download, inspect metadata, or encode PDF files back to Base64 all privately, zero server contact.
PDF preview will appear here
PDF Ready Preview Blocked
Your browser's security settings are preventing the inline PDF preview. Click Open in New Tab to view the PDF or click Download to save it.
Decode Any Base64 PDF in Three Steps
No account, no server uploads. Paste, preview, and download in seconds.
Paste Base64 or Data URI
Copy your Base64 PDF string and paste it into the input. Accepts raw Base64 starting with JVBERi0x or a full data:application/pdf;base64,… data URI auto-detected.
Decode & Preview
Click "Decode & Preview" to convert the Base64 back to binary bytes, build a Blob, and load it into the browser's built-in PDF viewer no plugins needed.
Download, Copy or Inspect
Save the .pdf file, copy the data URI for embedding in code, open it full-screen in a new tab, or visit the Metadata tab to inspect the PDF header and structure.
A Complete Base64 PDF Toolkit
Preview, download, encode, and inspect everything in one private browser tool.
In-Browser PDF Preview
Decoded PDFs load directly into your browser's native PDF viewer via a Blob object URL no third-party PDF library required. Scroll, zoom, and read pages instantly.
Two-Way Conversion
Decode Base64 to PDF and encode any PDF file to Base64. Drag-and-drop a PDF to generate its Base64 string and complete data:application/pdf;base64,… URI.
Metadata Inspector
After decoding, inspect the PDF version string, file size, magic byte signature (%PDF-), and the first 256 raw header bytes useful for debugging malformed PDFs.
One-Click Download
Save the decoded file directly as a proper .pdf with a single click no copy-pasting binary data into a hex editor or manually reconstructing the file.
Data URI Copy
Copy the complete data:application/pdf;base64,… URI to embed the PDF in an HTML <iframe>, an <object> tag, or any other context that accepts a URL.
100% Private
All encoding and decoding runs locally using native browser APIs. Your PDF data never touches a server safe for confidential reports, legal documents, and financial records.
When You Need Base64 PDFs
Base64-encoded PDFs show up across the full stack from API responses to email attachments.
API Response Inspection
Document generation APIs invoices, contracts, receipts, reports commonly return PDFs as Base64 in JSON. Decode and preview them instantly without writing code or saving files.
Email Attachment Recovery
MIME email attachments are Base64-encoded. Extract the Base64 payload from a raw .eml file and decode it here to recover and preview the original PDF attachment.
Webhook & Callback Debugging
Payment processors, e-signature platforms, and document services send PDF payloads via webhooks. Decode Base64 from captured webhook bodies to verify the correct document was delivered.
Backend & Microservice Testing
When testing PDF-generation microservices, compare Base64 output from different runs by decoding and previewing both PDFs side by side to verify content correctness.
HTML Embedding
Embed PDFs directly in HTML without a separate file using <iframe src="data:application/pdf;base64,…">. Encode your PDF here and copy the ready-to-use data URI.
Database & Storage Debugging
Applications that store PDFs as Base64 in SQL columns, Redis, or Firestore can have their documents decoded and previewed here to verify the stored content is intact and uncorrupted.
Base64 PDF Decoding Explained
PDF files are binary documents sequences of bytes containing cross-reference tables, object streams, and compressed page content. Base64 encodes this binary data as ASCII text by converting every 3 bytes into 4 printable characters, enabling PDFs to be safely transported in JSON payloads, HTTP responses, and email bodies.
To decode, the tool reverses the process using atob() to convert the Base64 string back to a raw binary string, then creates a Uint8Array byte array. This byte array is wrapped in a Blob with MIME type application/pdf and converted to an object URL via URL.createObjectURL().
The resulting URL is loaded into an <iframe> element, which hands it off to the browser's native PDF rendering engine. The PDF version is extracted by reading the first 8 bytes of the binary (%PDF-1.x).
Frequently Asked Questions
Everything you need to know about Base64 PDF encoding and this tool.
%PDF-1 (or %PDF-2). When Base64-encoded, those 6 bytes always produce the same 8-character sequence: JVBERi0x. This is a reliable way to identify that a Base64 string represents a PDF without fully decoding it first.JVBERi0x for PDF data), or a complete data:application/pdf;base64,… data URI. The prefix is automatically stripped just paste whatever you have and click decode.atob(), Blob, URL.createObjectURL(), and FileReader. Your PDF bytes never leave your device. This makes the tool safe for confidential legal documents, financial reports, medical records, and any other sensitive content.<iframe src="data:application/pdf;base64,JVBERi0x…"></iframe>. Note that browser support for inline PDF data URIs varies Chrome and Edge support it reliably, while Firefox and Safari may require a Blob URL approach or a dedicated PDF library. Use the "Copy Data URI" button to get the value ready to paste.%PDF-X.X header (e.g. 1.4, 1.7, 2.0); File size the size of the decoded binary in KB or MB; Magic bytes the first 8 bytes as hex, confirming a valid PDF signature; and the Raw header the first 256 bytes as hex for low-level inspection.