Skip to content
ToolsFort home

Base64 Encoder

Encode text to Base64 (UTF-8 safe), with URL-safe and MIME line-wrapping options.

Updated

0 chars
0 chars

Base64 represents binary data using 64 safe ASCII characters, so it can travel through systems designed for text — email, JSON, URLs and HTML data URIs.

How to use the Base64 Encoder

  1. 1 Type or paste the text to encode.
  2. 2 Choose URL-safe output or MIME line wrapping if you need them.
  3. 3 Copy the Base64 string.

Formula

Every 3 bytes (24 bits) → 4 characters of 6 bits each
Output length = 4 × ⌈bytes ÷ 3⌉ (padded with '=')

Worked examples

ASCII

Input: Hello, World!

Result: SGVsbG8sIFdvcmxkIQ==

Unicode

Input: héllo ✓

Result: aMOpbGxvIOKckw==

Encoded as UTF-8 first

Base64 is encoding, not encryption

Anyone can decode Base64 — it offers no secrecy. Never use it to "hide" passwords or secrets.

URL-safe Base64

Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe variant (RFC 4648 §5) replaces them with - and _ and usually omits the = padding. It is used in JWTs and many web APIs.

Size overhead

Base64 output is about 33% larger than the input, because every 3 bytes become 4 characters.

Runs locally

Everything happens in your browser — nothing you paste is uploaded or logged, so it is safe to use with API responses, tokens and internal data.

Frequently asked questions

Why does Base64 end with = or ==?

Padding: when the input length is not a multiple of 3 bytes, = characters fill the final group.

Does this support emoji and non-English text?

Yes. Text is encoded as UTF-8 before Base64, which is the web standard.

How do I decode Base64?

Use the Base64 Decoder tool.

Esc