Loading tool…

Base64 Decoder

Paste Base64 and decode online — text, image, or PDF preview when the payload matches. This page opens Decode mode.

How to use Base64 Decoder

  1. 1. Paste Base64. Raw string, Base64URL, or a full data URI.
  2. 2. See the preview. Images and PDFs render when magic bytes match; other files can be downloaded.
  3. 3. Copy or save. Copy decoded text/hex or download the file.

About this tool

“Base 64 decoder” searches want the reverse of encoding: recover the original string or file. Auto-detection matters more than snippet templates.

Base64 to image / PDF

When the decoded bytes are PNG, JPEG, WebP, GIF, or PDF, the studio shows a preview and lets you download with the correct extension.

Encoder decoder difference

Encode turns bytes into Base64 text. Decode turns Base64 text back into bytes. Same alphabet, opposite direction.

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 page is a preset of Base64 Studio — the same editor, opened for this specific use. Every feature is available here.

Frequently asked questions

Related tools

All tools