PDF to Base64 Encoder

code
Loading feedback…

Upload a PDF and convert it to Base64 for API tests, fixtures, email debugging, or document payloads.

Last updated: May 13, 2026Author: Mateo DíazReviewed by: Riley Williams
PDF to Base64 Encoder
In-browser
Encode a PDF file as Base64 or a data URL

Drop your file here or click to browse

Supports PDF files (max 10 MB)

Options

Output will appear here...

What is a PDF to Base64 encoder?

A PDF to Base64 encoder reads a PDF file and converts it into raw Base64 or an application/pdf data URL. This is useful for API tests, document fixtures, and debugging encoded document payloads.

How to use it

  1. Upload a PDF file.
  2. Choose raw Base64 or data URL output.
  3. Copy the encoded PDF string.

Example

Input: contract.pdf

Output: data:application/pdf;base64,JVBERi0x...

Common mistakes

  • PDF Base64 strings can be very large.
  • Some APIs reject the data:application/pdf;base64, prefix and expect raw Base64 only.
  • Base64 does not protect the document contents.

Related tools

Privacy and security

The PDF is read locally in your browser and is not uploaded by this tool.