How do I convert a PDF to a Base64 string?
Choose a PDF and wait for local encoding. Select raw Base64 or Data URL, then copy the complete result or download it as a TXT file.
Is PDF to Base64 conversion lossless?
Yes. Base64 is a reversible representation of the source bytes. Decoding the result produces the same PDF bytes; the document is not rendered or rewritten.
What is the difference between raw Base64 and a PDF data URL?
Raw Base64 contains only the encoded value. A PDF data URL adds data:application/pdf;base64, before that value so software can identify the media type.
Can I embed a Base64 PDF in an HTML iframe?
Yes. Choose Data URL and use the complete value as the iframe src. The same data URL can be used with an embed src or an object data attribute, although large inline PDFs may be limited by browser memory or Content Security Policy.
Is PDF Base64 the same as binary data or a Blob?
No. A PDF contains binary bytes, while Base64 is a text representation of those bytes. In browser code, a selected PDF File is already a kind of Blob; this tool converts its bytes to text.
Does this create a public URL for my PDF?
No. A PDF data URL contains the complete encoded document inside the value. It is not an uploaded file, hosted address, or public sharing link.
Can this tool decode Base64 back to PDF?
No. This page performs PDF-to-Base64 encoding. Converting a Base64 string back into a PDF is the reverse operation and requires a Base64-to-PDF decoder.
Does Base64 make a PDF smaller?
No. Standard Base64 is normally about one-third larger than the binary source because three input bytes are represented by four text characters.
Does converting a PDF to Base64 encrypt it?
No. Anyone with the Base64 value can decode it. Use PDF password protection or an appropriate encryption system when confidentiality is required.
Can I encode a password-protected PDF?
Yes. Encoding copies the existing bytes and does not require the document password. The decoded PDF remains password protected in the same way as the source.
Is the complete Base64 shown in the preview?
Small results are shown completely. Large results are shortened in the visible preview for performance, while Copy and Download TXT still use the complete value.
Is my PDF uploaded?
No. The file is validated and encoded locally in browser memory. It is not sent to a document-processing server.
Can I use the result in JSON?
Yes. Choose raw Base64 and use the copied value as a JSON string, subject to the size limits of the API or database receiving it.
How large can the selected PDF be?
The current limit is 100 MB on desktop browsers and 32 MB on mobile devices. Base64 output is about one-third larger than the source PDF, so very large results also require additional browser memory.