Loading tool…

Base64 to PDF

Paste Base64 to recover a PDF — Decode mode with download. Inline preview uses the browser’s PDF viewer when available.

How to use Base64 to PDF

  1. 1. Paste Base64. Raw or `data:application/pdf;base64,…`.
  2. 2. Confirm PDF detection. Detected label should say PDF document.
  3. 3. Download. Save as .pdf.

About this tool

“Base 64 to pdf” is the reverse of PDF→Base64 — common when an API returns a document as a Base64 field.

Preview

Modern browsers can show PDFs in an iframe from a Blob/Data URI. If preview fails, download still works when magic bytes are `%PDF-`.

Code examples

Node

Buffer.from("hello").toString("base64");
Buffer.from(b64, "base64").toString("utf8");

Browser (UTF-8 safe)

btoa(unescape(encodeURIComponent(text)));
decodeURIComponent(escape(atob(b64)));

Python

import base64
base64.b64encode(b"hello").decode()  # aGVsbG8=
base64.b64decode("aGVsbG8=").decode()

Data URI

const uri = `data:image/png;base64,${b64}`;
// <img src={uri} /> or CSS url('${uri}')

This is one direction of Base64 Studio. The editor is the same; the title and default direction match this search.

Frequently asked questions

Related tools

All tools