How to convert PDF to Base64 and Base64 to PDF
- PDF to Base64: drop or select a
.pdfdocument (up to 25 MB) to generate adata:application/pdf;base64,URI or raw Base64 payload for APIs and webhooks. - Base64 to PDF: paste raw Base64 (starting with
JVBERi0...) or adata:application/pdf;base64,URI into the Base64 pane. The tool verifies the%PDF-signature, previews the document inline, and lets you save the reconstructed.pdffile.
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.