PDF to Base64 Converter
Encode a PDF as a Base64 string or a data URI, ready to embed in code.
To convert a PDF to Base64, add the file and its bytes are encoded in your browser. Choose a raw string, a `data:` URI you can drop straight into an <embed> or an email template, or the URL-safe alphabet for use in a query string. Base64 grows the file by about a third, so a 4 MB PDF becomes roughly 5.5 MB of text.
Runs in your browser- Size
- Base64 is about 33% larger than the original bytes
- Privacy
- Runs entirely in your browser — nothing is uploaded
- Cost
- Free, unlimited, no sign-up
Frequently asked questions
Why is the output so much bigger than my PDF?
Which variant should I use?
How to use the pdf to base64 converter
- 1Select your pdf file — the file stays on your device and is never uploaded.
- 2Choose the output as.
- 3Press Run, then download the result when it is ready.
Embed this tool
Put the working pdf to base64 converter on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.
Share this tool
Related tools
File to Base64 ConverterEncode any file — image, PDF, video, font, archive — as Base64, a data URI, hex or a byte array.Base64 to PDF ConverterDecode a Base64 string into a real, downloadable PDF file.Base64 to File ConverterDecode Base64, a data URI or hex back into a downloadable file, with the type detected automatically.Multi-Format EncoderEncode text into Base64, hex, binary, URL, HTML entities, ROT13 and more, all at once.Base64 Encoder & DecoderEncode and decode Base64 with automatic direction detection, plus file and data-URI support.Data URI GeneratorTurn text, SVG or CSS into a data: URI you can inline directly in HTML or stylesheets.
Last updated
More encoders & decoders