Encoding converters
PDF to Base64
Convert a PDF to Base64 online: drop the document and get raw Base64 or a ready-to-paste data URI, with page count and exact size shown. 100% in your browser — the file is never uploaded.
Drop a PDF and get its Base64 — with page count, exact size and a live document preview, plus a data URI ready for <embed>, <iframe> or API payloads. The MIME type is verified from the file's magic bytes, so the output stays correct even when the extension is wrong. Your document is read in the browser and never uploaded — unlike the server-based converters.
Drop a file here
Any file works — images, PDFs, audio, video, archives. It is read locally in your browser and encoded to Base64 instantly; nothing is uploaded.
How to use
PDF to Base64, step by step
- 01
Drop a PDF onto the box (or click to choose one). The document is read locally with the File API — there is no upload endpoint on this site, so sensitive documents never leave your device.
- 02
Read the result card: page count, exact byte size, detected MIME type and the Base64 character count. Copy the raw Base64, the ready-to-paste data URI, or the hex view of the leading bytes.
- 03
Use the raw Base64 for APIs, JSON payloads, database storage or embedded previews; use the data URI when you want a paste-ready form for <embed>, <iframe> or object elements.
FAQ
Frequently asked questions
Yes — the only constraint is your device memory. A 10 MB PDF becomes roughly a 13.3 MB Base64 string, which browsers handle comfortably. The page count shown in the result comes from parsing the document structure locally, not from any server.
Format arithmetic: every 3 bytes become 4 characters (the fixed 33% Base64 overhead), plus nothing else — no headers, no checksums. The exact overhead percentage for your file is shown in the result card so you can plan email attach limits and database columns.
The data URI prepends data:application/pdf;base64, — a complete, paste-ready address for <embed src>, <iframe> and <object data>. The raw Base64 is what APIs, databases and S3-style storage expect when the type is already declared elsewhere.
No. FileReader inside your tab does the reading; the conversion is pure JavaScript. Open the browser network tab and convert — you will see no requests. That is the difference from the major server-side converters, which send your document to their pipeline.
Yes — Base64 to PDF decodes a string back into a downloadable PDF with an inline preview and page count. The two pages are exact mirrors of each other.
Related tools