pdf to base64
Our PDF to Base64 roundtrip kept one editable field and its saved value; the matching flattened PDF kept zero fields and could not be filled.
Use a public PDF URL instead
The source must allow this browser to read it. No server proxy is used.
Ready. All encoding stays in your browser.
Editable fields versus a matching flattened page
Our editable specimen had one field containing Amber before and after the roundtrip; after changing it to Teal, saving and reopening retained Teal in both files.
We made the sample_label text field ourselves, then created a flattened counterpart by painting that same field appearance onto the page and removing its editable widget and field tree. Rendering both originals with the same renderer and dimensions produced identical pixels. Both PDFs were independently encoded, decoded and reopened with a PDF parser. The flattened file still showed Amber on the page but had no stored form field value.
| Item | Original | After decoding |
|---|---|---|
| Editable PDF: field count | 1 | 1 |
| Editable PDF: stored value | Amber | Amber |
| Editable PDF: edit, save, reopen | Teal retained | Teal retained |
| Flattened PDF: field count | 0 | 0 |
| Flattened PDF: stored field value | No field value | No field value |
| Flattened PDF: edit, save, reopen | No editable field | No editable field |
Original editable PDF · Original flattened PDF · Restored editable PDF · Restored flattened PDF
Repeat the comparison
- Download both original samples and encode each separately with the tool.
- Decode each plain Base64 output back into a PDF file.
- Inspect the named form fields and their stored values with a PDF parser. For the editable sample, change sample_label from Amber to Teal, save, close and reopen.
- Repeat on the original and recovered files. The flattened sample has no sample_label field to edit. Its visible Amber text is page content, not a stored field value.
These recorded results came from our original specimens and parser-based save/reopen test. This encoder does not inspect visitor PDFs for fields, flatten files or certify viewer compatibility. A viewer may display a PDF without supporting form editing.
Supported input and output
This pdf to base64 converter reads one local PDF, a dropped PDF, or a public PDF URL that permits cross-origin browser access. Password-protected PDFs can be encoded as bytes; encoding does not unlock them. Available device memory limits file size. Outputs include plain Base64, PDF data URI, HTML embed, hyperlink and object markup, JavaScript popup code, JSON and XML. Copy or download the complete result. No accounts, batch processing or saved history.
How do I convert pdf to base64?
Choose one PDF, select your output format, then copy the result. Encoding starts when the file is selected. To restore the file later, decode the Base64 bytes; this page performs only the PDF-to-text direction.
Will encoding make a flattened PDF editable?
Not in our test: the flattened original and recovered file each had zero fields. The editable sample retained its field and supported the saved-value change. This is a measured difference in form data, not a claim based on matching previews.