Loading tool…

Base64 Studio

Encode or decode Base64 online — text, images, PDFs, files — free, no upload. Nothing is uploaded.

How to use Base64 Studio

  1. 1. Choose Encode or Decode. Encode turns text/files into Base64. Decode pastes Base64 back to text, image, or PDF.
  2. 2. Paste, type, or drop a file. Images, PDFs, Office docs, audio, fonts, and UTF-8 text (emoji-safe).
  3. 3. Copy a snippet or download. Data URI, HTML, CSS, JSX, JSON, or cURL on encode — Save file on decode.
  4. 4. Stay local. Everything runs in your browser. Nothing is uploaded.

About this tool

Base64 (often searched as “base 64”) carries binary through ASCII channels: JSON, email (MIME), and data URIs (RFC 4648). Every 3 bytes become 4 characters from `A–Z a–z 0–9 + /`, with `=` padding. Base64URL swaps `+`/`/` for `-`/`_` (JWT style). This studio encodes and decodes text, images, PDFs, and files entirely in your browser.

Base64 encoder vs decoder

An encoder converts bytes or text into a Base64 string. A decoder reverses that string back to bytes — for example Base64 to image or Base64 to PDF. They are not machine-learning “encoder–decoder models”; just opposite directions of the same encoding. Use the Encode/Decode toggle, or land on dedicated URLs like /tools/base64-encode and /tools/base64-decode.

Is Base64 encryption?

No. Searches for “base 64 encryption” are common, but Base64 is reversible encoding — anyone can decode it. Use HTTPS and real cryptography (TLS, AES, password hashing) for secrets. Never treat Base64 as a way to hide passwords or tokens.

Image to Base64 and Base64 to image

Drop a PNG, JPG, WebP, GIF, SVG, ICO, or AVIF to get a Data URI (`data:image/png;base64,…`) for HTML and CSS. Paste Base64 back in Decode mode to preview and download the image. Prefer Base64 for small icons and email HTML — large photos bloat pages.

PDF to Base64 and Base64 to PDF

Many APIs accept PDF bytes as a Base64 JSON field. Encode a PDF here to test payloads, or decode an API response back to a downloadable .pdf. Size grows about 33%.

URL-safe Base64 and MIME wrap

Standard Base64 uses `+`, `/`, and `=`, which break in URLs. Toggle URL-safe (Base64URL) for JWTs and query strings. Wrap at 64 or 76 characters for MIME email; use flat output for JSON and data URIs.

Encoding examples (JS & Python)

Browser (UTF-8 safe): encode with TextEncoder bytes, not raw btoa on Unicode. Node: `Buffer.from(text).toString('base64')`. Python: `base64.b64encode(b'hello').decode()` → `aGVsbG8=`. Decode with the matching API in reverse.

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}')

Base64 encode & decode

Frequently asked questions

Related tools

All tools