Tools
EN

PDF to Base64 Converter

Select a PDF to convert it into a Base64 string you can embed in JSON, XML or HTML. The file is processed locally and never uploaded.

Drop a file here or click to chooseYou can also paste a file with Ctrl+V

Private: your data is processed in your browser and never uploaded.

How to convert a PDF to Base64

  1. Drop your PDF onto the box or click to choose it.
  2. Select the output: raw Base64, a data URI or a JSON object with file name and type.
  3. 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.