PDF to Base64
Drop a PDF and get a Base64 string ready for JSON, APIs, databases, or data URLs — instantly, in your browser.
Drop a file here or click to browse
Any file type — converted to Base64 locally
Any PDF, any size
Encode contracts, invoices, reports — limited only by browser memory.
Instant encode
Base64 output as soon as the file is read. One-click copy.
Private by design
Files stay in your browser — never uploaded, never logged.
When you need a PDF as Base64
REST APIs, GraphQL mutations, e-signature webhooks, and SOAP services commonly accept PDF attachments as Base64 strings inside JSON or XML. Encoding lets your binary file travel through text-only transports without corruption.
Going the other way? Use the Base64 to PDF tool.
Frequently asked questions
›How do I convert a PDF to Base64?
Drop the .pdf file into the tool above (Encode mode). The PDF is read locally and the Base64 string is generated instantly — copy it into a JSON field, API payload, database column, or email template.
›Is my PDF uploaded?
No. The file is read with the browser's FileReader and encoded in memory. Nothing is uploaded — safe for invoices, contracts, NDAs, and any confidential document.
›How do I create a PDF data URL?
Prefix the Base64 output with data:application/pdf;base64, — for example data:application/pdf;base64,JVBERi0xLjQK… You can use the data URL as a download link or to render the PDF inline in an iframe.
›Why is the Base64 larger than the PDF?
Base64 encodes every 3 bytes as 4 ASCII characters, so the encoded string is ~33% larger than the source PDF. That's the standard overhead for embedding binary data as text.
›What's the maximum file size?
There is no upload, so size is limited by your device's available memory. Browsers handle PDFs up to ~50–100 MB comfortably.
More free developer tools
Part of our growing tool belt — all client-side, all free.