PDF -> BASE64 · Local tool
PDF to Base64
Turn a PDF into base64 text for an API or a JSON field.
Last updated
How do I convert a PDF to base64?
Drop the PDF onto filetity's encoder and the base64 appears, ready to copy, either as the payload alone for a JSON field or as a complete data URL for a link or a frame. It is read off your disk and encoded in the browser tab, with no request in the path, which matters because a PDF sent to an API this way is usually a contract, an invoice or a statement. The number to watch is the size: base64 turns three bytes into four characters, so a 3 MB PDF becomes roughly 4 MB of text, and that growth is why an API accepting base64 often rejects documents you would think were comfortably small. Compressing the PDF before encoding shrinks both by the same proportion.
01 / Your device
the file stays here
02 / Browser memory
the work runs locally
03 / Back to you
saved on this device
When you would use this
Situations, not settings.
- An API that takes a document as a JSON field
- Take the payload without the prefix, which is what receiving code almost always expects.
- Embedding a small PDF directly in a page
- The data URL form works in a link or a frame with no separate request, which is worth it for something small and not for something large.
- A request that keeps coming back too large
- Base64 adds about a third. Compressing the PDF first shrinks both it and the text by the same proportion.
How it works / no cloud
A conversion engine, not an upload form.
The file is read into memory and encoded in chunks, because handing a whole PDF to the obvious one-line encoder throws a call stack error at around a hundred kilobytes. You get the payload alone, which is what a JSON field wants, or a complete data URL.
- Offline ready
- Installable app
- No file limit queue
Straight answers
No accordion. Nothing hidden.
- Is it free?
- Yes, with no watermark and no page limit.
- Does it need an account?
- No. There is no account system.
- Is my file processed on my device?
- Yes. The file is read by your browser and never uploaded. There is no server to send it to.
- What formats are supported?
- PDF in. Base64 text out, with or without the data: prefix.
- What are the limits?
- Base64 is about a third larger than the file, so a 3 MB PDF becomes roughly 4 MB of text. Many APIs that accept one cap well below what you would expect from the original's size.
- Does it work on mobile?
- Yes, on any modern mobile browser. Large files are limited by the memory the phone gives the browser.
- Does it work offline?
- Yes, once the page has loaded. The tool keeps working with no network connection.
- Which form does an API usually want?
- The payload alone, without the prefix, because the receiving code knows it is getting a PDF and adds any wrapper itself. The data URL form is for putting the document directly into a link or an iframe in a page, which is a different job. Both are one click apart here.
- How much larger does base64 make it?
- About a third. Three bytes become four characters, so a 3 MB PDF becomes roughly 4 MB of text. That growth is why an API accepting base64 usually has a request size limit that rejects documents you would think were comfortably small.
- Can I paste the result straight into JSON?
- Yes. Base64 uses only characters that are safe inside a JSON string, so it needs no further escaping. What you may need to handle is length: some editors and some logging systems truncate very long lines, and a truncated payload decodes to nothing useful.
- Is the document uploaded to encode it?
- No. It is read off your disk by the browser and encoded in the tab, with no request in the path. That is worth knowing when the PDF is a contract or a bank statement, which is most of what gets sent to an API this way.
- Should I compress the PDF first?
- Usually yes, if it is going into a size-limited request. Compressing the PDF before encoding it shrinks both the file and the text by the same proportion, and it is far more effective than anything you can do to the base64 afterwards, which cannot be compressed further in any useful way.
Keep working locally
3 available · more coming