Base64 Encode

Convert plain text to a Base64-encoded string. Runs entirely in your browser — nothing is uploaded.

Plain text
Base64 output

Need to scan documents to real PDFs?

Offline PDF Scanner turns your phone camera into a real PDF scanner — with searchable text, not just photos. Works completely offline.

What is Base64 encoding?

Base64 is a binary-to-text encoding that represents arbitrary byte sequences using only 64 printable ASCII characters: A–Z, a–z, 0–9, +, and /. An equals sign (=) is used as padding so the output length is always a multiple of four. Base64 is not encryption — it is a way to safely carry binary data through systems that only handle text, such as email bodies, JSON payloads, URLs, or HTML attributes.

How to use this Base64 encoder

  1. Paste or type your text into the left panel, or click Upload to load a file.
  2. Optionally enable URL-safe output or remove the padding characters.
  3. Click Encode →. The Base64 result appears instantly on the right.
  4. Click Copy or Download to export the result.

Common uses for Base64

  • Embedding images in HTML or CSS with data:image/png;base64,… URIs.
  • Email attachments — MIME uses Base64 to wrap binary attachments into the text body.
  • JSON & JWT tokens — binary payloads inside JSON are typically Base64-encoded.
  • Basic auth headers — HTTP Authorization: Basic encodes user:pass as Base64.
  • URL tokens — the URL-safe variant is used in OAuth, JWT, and short links.

Privacy

This tool works 100% in your browser. Your input never leaves your device — no server, no analytics on your content, no third-party uploads. You can disconnect from the internet and it will still work.

Frequently Asked Questions