← Back to Tools

Base64 to PDF

Paste a Base64-encoded PDF string and preview or download the result.

Your Base64 data is processed locally in your browser and is not uploaded.

PDF Preview
Convert a valid Base64 PDF to preview it here.

Base64 to PDF Converter — Decode PDF Files Locally

Convert Base64-encoded strings into downloadable PDF files directly in your browser. Useful for testing API payloads that return PDF documents as Base64, debugging document generation pipelines, and inspecting file responses from APIs. Runs entirely client-side — your data never leaves your device.

How to convert Base64 to PDF

  1. 1. Paste your Base64 string — copy the Base64-encoded PDF data from your API response, config file, database, or any other source and paste it into the text area above. The tool accepts both raw Base64 and the full data URL format (data:application/pdf;base64,…).
  2. 2. Click “Convert to PDF” — the string is decoded entirely in your browser using the Web Crypto APIs. No data is ever sent to a server.
  3. 3. Preview or download— the decoded PDF renders inline so you can inspect it immediately. Use the “Download PDF” button to save it to your device as a .pdf file.

What is a Base64-encoded PDF?

Base64 is a binary-to-text encoding scheme that represents binary data — like the bytes of a PDF file — using only the 64 printable ASCII characters (A–Z, a–z, 0–9, +, and /). Because many protocols and storage systems were originally designed to handle text, Base64 encoding is a common way to safely embed binary files in JSON payloads, HTML data: URIs, email attachments (MIME), and configuration files.

A Base64-encoded PDF starts with JVBERi0x — the Base64 representation of the PDF magic bytes %PDF-1. When wrapped in a data URL it takes the form data:application/pdf;base64,JVBERi0x….

Common use cases

  • Debugging API responses — REST and GraphQL APIs often return PDFs as Base64 strings inside a JSON field. Paste the value here to verify the file renders correctly before writing any code.
  • Inspecting email attachments — SMTP MIME parts encode attachments in Base64. Extract the encoded block and decode it here to preview the attachment.
  • Testing document-generation pipelines — services like AWS Textract, Google Document AI, DocuSign, and reporting libraries return or accept PDFs as Base64. Use this tool to sanity-check the output at each step.
  • Embedding PDFs in HTML or CSS — data URIs let you inline a PDF directly in an <iframe> or <object> tag without a separate HTTP request. Decode here to confirm the content before embedding.

Related tools

Frequently asked questions

Is my Base64 data sent to your servers?
No. The entire conversion happens in your browser using JavaScript. Nothing is ever uploaded or logged. You can disconnect from the internet and the tool will still work.
What happens if the Base64 string is not a valid PDF?
The tool checks for the PDF magic-byte signature (%PDF) after decoding. If the decoded bytes do not start with those bytes, an error is shown and no file is created.
Does it support data URL format?
Yes. You can paste either raw Base64 or a full data URL such as data:application/pdf;base64,…. The prefix is stripped automatically before decoding.
Is there a size limit?
There is no hard server-side limit because nothing is uploaded. The practical limit is your browser's available memory. Most modern browsers handle PDFs of several hundred megabytes without issue.
How do I convert a PDF to Base64 instead?
Use the companion PDF to Base64 tool — upload or drop any PDF file and get the Base64 string in seconds.
What API responses include Base64-encoded PDFs?
Many document-management, e-signature, reporting, and document-generation APIs return PDFs as Base64 strings inside a JSON field. Examples include DocuSign, Adobe Sign, AWS Textract, Google Document AI, and custom reporting services.