PDF to Base64 & Base64 to PDF Converter

Encode a PDF document to Base64, or decode and preview a Base64 PDF. Runs in your browser; nothing is uploaded.

PDF preview
Choose a file above or paste Base64 on the left to preview and download it here.

How to convert PDF to Base64 and Base64 to PDF

  1. PDF to Base64: drop or select a .pdf document (up to 25 MB) to generate a data:application/pdf;base64, URI or raw Base64 payload for APIs and webhooks.
  2. Base64 to PDF: paste raw Base64 (starting with JVBERi0...) or a data:application/pdf;base64, URI into the Base64 pane. The tool verifies the %PDF- signature, previews the document inline, and lets you save the reconstructed .pdf file.

Frequently asked questions

How does the tool verify that a raw Base64 string is a PDF?
Every valid PDF document starts with the 5-byte ASCII signature %PDF- (hex 25 50 44 46 2D) within the first 1,024 bytes. When you paste raw Base64 or a data:application/pdf;base64, URI, the tool checks for this header before rendering and downloading the PDF.
How do I embed a Base64 PDF inside an HTML page?
Use the Data URI format (data:application/pdf;base64,JVBERi0xLj...) inside an <iframe src="data:application/pdf;base64,..."> or convert the decoded bytes to a Blob URL with URL.createObjectURL(blob) for faster rendering on large documents.
Are my PDF documents uploaded to any server?
No. Encoding, decoding, and previewing happen 100% locally in your browser using JavaScript and a local Blob URL.