How to convert PDF to Base64
- Click Choose PDF file, or drag your PDF into the box.
- Tick Add data:application/pdf;base64, if you need a data URI for a web page.
- Click Copy Base64, or Download .txt.
When do you need Base64?
Base64 turns a file into plain letters and numbers, so it can travel inside JSON, XML, HTML or an email. Developers use it to send PDFs to an API or to embed a small PDF in a web page.
Need to go the other way? Use Base64 to PDF.
Private and free
Conversion happens inside your browser, so your file is never uploaded to a server. When you close the tab, it is gone. That matters here, because many PDFs sent to APIs contain private data.
Frequently asked questions
Why is the Base64 text bigger than my PDF?
Base64 always makes data about one third bigger, because it uses only safe text characters.
What is a data URI?
It is Base64 with data:application/pdf;base64, in front, so a browser knows the text is a PDF.
Are my files uploaded?
No. Conversion happens inside your browser, so your file is never uploaded to a server. When you close the tab, it is gone.