Documents to text
PDF to Base64 Converter
Drop a PDF and get its Base64 text instantly. Useful for embedding documents in API payloads and templates, all without uploading the file.
Drop your file here
or use the button — everything stays on this device
- File name
- —
- File size
- —
- Type
- 100% in your browser — no uploads
- No sign-up, no watermark, no quota
- Works offline once the page has loaded
How it works
Choose a PDF
Select a .pdf file or drag it onto the drop zone.
Read the Base64
FileReader encodes the document as a data URL, with raw Base64 available through the toggle.
Copy or download
Copy the text for a JSON field or template, or save it as a .txt file.
Encoding PDFs to Base64
Many APIs accept documents as Base64 strings rather than file uploads. This tool reads a PDF with FileReader and produces the exact encoded text, either as a data URL or raw Base64.
Reading a file does not upload it — the encoding happens in the browser and the document never leaves your computer.
Frequently asked questions
How do I convert a PDF to Base64?
Drop the .pdf file and the text appears at once. Toggle between the data URL and raw Base64, then copy what you need.
Is the PDF uploaded anywhere?
No. The file is read locally with FileReader, so sensitive documents stay on your device.
How much larger is Base64?
Base64 text is about 33% larger than the original file, so a 1 MB PDF becomes roughly 1.33 MB of text.
Can I use the output in a JSON API?
Yes. Raw Base64 is the usual choice for JSON document fields; the data URL form is handy for direct browser display.