# 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.

**URL:** https://convertto.tech/t/pdf-to-base64
**Category:** Encoders & Decoders (https://convertto.tech/c/encoding-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **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

## How to use

1. Select your pdf file — the file stays on your device and is never uploaded.
2. Choose the output as.
3. Press Run, then download the result when it is ready.

## FAQ

### Why is the output so much bigger than my PDF?

Base64 represents three bytes as four characters, so the text is about 33% larger than the file. That is inherent to the encoding, not to this tool.

### Which variant should I use?

A data URI to embed the document directly in HTML or CSS. Raw Base64 for a JSON payload. URL-safe when the string goes into a query parameter or a filename, since "+" and "/" have meaning there.

## Related tools

- [File to Base64 Converter](https://convertto.tech/t/file-to-base64): Encode any file — image, PDF, video, font, archive — as Base64, a data URI, hex or a byte array.
- [Base64 to PDF Converter](https://convertto.tech/t/base64-to-pdf): Decode a Base64 string into a real, downloadable PDF file.
- [Base64 to File Converter](https://convertto.tech/t/base64-to-file): Decode Base64, a data URI or hex back into a downloadable file, with the type detected automatically.
- [Multi-Format Encoder](https://convertto.tech/t/multi-encoder): Encode text into Base64, hex, binary, URL, HTML entities, ROT13 and more, all at once.
- [Base64 Encoder & Decoder](https://convertto.tech/t/base64-encode-decode): Encode and decode Base64 with automatic direction detection, plus file and data-URI support.
- [Data URI Generator](https://convertto.tech/t/data-uri-generator): Turn text, SVG or CSS into a data: URI you can inline directly in HTML or stylesheets.
- [Add Page Numbers to PDF](https://convertto.tech/t/add-page-numbers-pdf): Number the pages of a PDF with a custom start, position and format.
- [AZW3 to EPUB Converter](https://convertto.tech/t/azw3-to-epub): Convert Kindle AZW3 format to open EPUB format.
