PDF to Base64
Upload Your PDF File

or drop your file anywhere on this page

Processed in your browser, never uploaded

How to Convert a PDF to Base64

  1. Add your PDF – Drop the file into the box above.
  2. Choose the format – Tick "Add the data URI prefix" if you want a string that starts with data:application/pdf;base64, – for example to use it directly in HTML.
  3. Convert – Click "Convert to Base64". The size of the result is shown below the text box.
  4. Copy or download – Copy the string to the clipboard or download it as a .txt file.

PDF to Base64 Encoder: What You Get

When You Need Base64

PDF to Base64 Encoder: Good to Know

PDF to Base64 – Frequently Asked Questions

What is Base64?

Base64 writes binary data, such as a PDF, using only letters, digits, + and /. This lets you send a file through systems that only accept text.

Why is the Base64 string larger than my PDF?

Every 3 bytes become 4 characters, so the result is about 33% larger.

What is the data URI prefix?

The text data:application/pdf;base64, at the start tells browsers that the string is a PDF. Leave it off if your API expects only the Base64 data.

How do I turn Base64 back into a PDF?

Paste the string into the Base64 to PDF tool and download the file.

Is my file uploaded?

No. The encoding runs in your browser, so the PDF stays on your device.

Is it free?

Yes – no sign-up and no watermark.

Not sure which format fits your goal? See Convert PDF Guide.