Free Online Calculator

Base64 Encode / Decode

Encode text to Base64 or decode Base64 to text, with UTF-8 and URL-safe options.

Last updated: Free, no sign-up Private — runs in your browser

Quick answer: what is Base64?

Base64 represents binary data using 64 printable characters (A–Z, a–z, 0–9, + and /). “Hello, World!” encodes to SGVsbG8sIFdvcmxkIQ==. The output is about 33% larger than the input, and it is encoding, not encryption.

Overview of the Base64 Encode / Decode Tool

Base64 converts data into plain text that can be safely placed in emails, JSON, HTML, URLs and configuration files. This tool encodes text to Base64 and decodes it back, handling UTF-8 correctly so Hindi, accented letters and emoji round-trip properly. A URL-safe option replaces + and / with - and _ and drops the padding.

Developers use Base64 for data URIs, basic-auth headers, JWT segments and embedding small files. Base64 is not encryption — anyone can decode it, so never use it to protect secrets. For percent-encoding of URLs see the URL Encode / Decode.

How Base64 Works

Every three bytes of input become four Base64 characters.

  1. The text is converted to UTF-8 bytes.
  2. Bytes are grouped in threes (24 bits) and split into four 6-bit values.
  3. Each 6-bit value (0–63) maps to a character in A–Z, a–z, 0–9, + and /.
  4. If the input is not a multiple of three bytes, = padding fills the end (one or two =).
  5. Decoding reverses the steps; URL-safe Base64 swaps + and / for - and _.
3 bytes (24 bits) → 4 characters (4 × 6 bits)
size increase ≈ 4 ÷ 3 ≈ 33%
Base64 examples
TextBase64
Hello, World!SGVsbG8sIFdvcmxkIQ==
aYQ==
abYWI=
abcYWJj
WebsolindiaV2Vic29saW5kaWE=

Common Uses and Cautions

  • Embedding small images and fonts as data URIs in CSS or HTML.
  • Sending binary attachments in email (MIME) and JSON APIs.
  • HTTP Basic authentication headers (username:password in Base64) — only safe over HTTPS.
  • JWT tokens use URL-safe Base64 for each segment.
  • Base64 does not hide or protect data; use proper encryption for secrets.

Base64 Encode / Decode — Frequently Asked Questions

What is Base64?

A way of writing binary data using 64 printable characters so it can be carried in text-only formats.

How do I encode text to Base64?

Choose Encode, type or paste your text and the Base64 appears immediately.

How do I decode Base64?

Choose Decode and paste the Base64 string. Spaces and line breaks are ignored.

Is Base64 encryption?

No. It is a reversible encoding with no key, so anyone can decode it.

Why does Base64 end with =?

Padding. Input that is not a multiple of three bytes is padded with one or two = signs.

What is URL-safe Base64?

A variant using - and _ instead of + and / (and usually no padding), so it can sit in URLs and filenames.

Does it support Hindi and emoji?

Yes. Text is converted with UTF-8 first, so every character round-trips correctly.

Why is my decoded result unreadable?

The Base64 may hold binary data such as an image or file rather than UTF-8 text.

How much bigger is Base64?

About 33% larger than the original.

Is my data stored?

No. Everything is processed in your browser and nothing is uploaded.

More Free Calculators You May Need

Need a custom calculator or tool on your website?

Our team designs and develops fast, SEO-ready websites and web tools. Tell us what you need.

Call Us WhatsApp

Get a Free Quote

Tell us a bit about your project — we'll get back to you shortly.

4 + 9 =
Call WhatsApp