How to convert a PDF to Base64
- Drop your PDF onto the box or click to choose it.
- Select the output: raw Base64, a data URI or a JSON object with file name and type.
- Copy the result or download it as a text file.
Why encode a PDF as Base64?
JSON and XML can only carry text, so APIs for e-invoicing, e-signatures, printing and document storage expect files as Base64 strings. Base64 is also how PDFs travel as email attachments.
Embedding a PDF in a web page
Choose Data URI and use it in an iframe: <iframe src="data:application/pdf;base64,…"></iframe>. Keep in mind that large PDFs make the HTML page heavy.
Frequently asked questions
How large will the Base64 string be?
About 33% larger than the PDF. A 1 MB PDF becomes roughly 1.37 MB of Base64 text.
Is there a maximum PDF size?
The limit is your device's memory. PDFs of 100 MB and more work on most computers.
How do I turn the Base64 back into a PDF?
Use our Base64 to PDF converter: paste the string and download the original document.