Base64

PDF to Base64 Converter

Turn a PDF into a Base64 string you can embed in JSON, an API request, an email or a web page.

Up to 10 MB. Your file is processed and returned straight away; it isn't stored.

How to convert a PDF to Base64

  1. Choose a PDF file from your device.
  2. Tick the data URI option if you want to use it directly in a browser.
  3. Press Convert to Base64.
  4. Copy the result or download it as a .txt file.
  • Base64 is about 33% larger than the original file.
  • To turn it back into a PDF, use the Base64 to PDF tool.

PDF to Base64: frequently asked questions

How do I convert a PDF to Base64?

Choose your PDF and press Convert to Base64. Copy the string from the result or download it as a .txt file.

What is a data URI?

A data URI puts the file type in front of the Base64, like data:application/pdf;base64,…, so browsers can open or embed it directly. Tick the option to include it.

Why is the Base64 bigger than my PDF?

Base64 represents every 3 bytes as 4 text characters, so it is about 33% larger than the original file.

More Base64 tools