About PDF to Base64 Converter
Converting a PDF to Base64 turns the whole file into a long text string that can be pasted into code, embedded in a web page, or sent through an API that only accepts text. This page does it entirely in your browser: pick a PDF, and the Base64 output appears at once in seven ready-to-use formats.
Because nothing is uploaded, even private documents stay on your device. Base64 output is about 33 percent larger than the original file, so very large PDFs produce very long strings - for most forms, certificates and short documents this is no problem at all.
How to use it
- Choose your PDF file.
- The Base64 output appears automatically - pick Raw Base64, Data URI, Image, CSS, Markdown or JSON.
- Press Copy and paste the result wherever you need it.
Frequently asked questions
How do I convert PDF to Base64?
Choose your PDF file and the Base64 string appears automatically. Copy it as Raw Base64 for code, or as a Data URI to embed the PDF straight into a web page.
What is a PDF Data URI used for?
A Data URI lets you embed a PDF directly in HTML or CSS without a separate file, for example in an object tag or a download link. It works best for small PDFs, since the string is about a third larger than the file.
Is there a file size limit?
There is no fixed limit, but Base64 strings grow fast: a 10 MB PDF becomes roughly 13.7 MB of text, which can slow down a browser tab. For everyday documents up to a few megabytes it works smoothly.
Is my PDF uploaded anywhere?
No. The conversion runs in your browser with the FileReader API. Your PDF never leaves your device and is never stored.