All tools
Developer tools

Base64 Encoder

Encode any text to standard or URL-safe Base64 instantly. Supports up to 500 KB — results are ready to copy in one click.

Standard Base64 · RFC 4648 URL-safe Base64 · RFC 4648 §5 Up to 500 KB
Get started free Sign in

Free · No credit card · 50 credits/day

Standard vs URL-safe Base64

Two flavours — same algorithm, different character sets.

Standard Base64

RFC 4648 — the default

Characters: A–Z a–z 0–9 + / =
Padding with = to a multiple of 4
+ and / are unsafe in URLs — need percent-encoding
Example
SGVsbG8gV29ybGQ=

Use for: email (MIME), JSON, XML, binary-in-text storage.

URL-safe Base64

RFC 4648 §5 — for URLs and filenames

Characters: A–Z a–z 0–9 - _
No padding — trailing = stripped
Safe in URLs, filenames and HTTP headers without escaping
Example
SGVsbG8gV29ybGQ

Use for: JWTs, OAuth tokens, URL query params, filenames.

Where is Base64 used?

Base64 appears wherever binary data needs to travel through text-only channels.

📧

Email attachments (MIME)

SMTP only handles ASCII text. Email clients encode binary attachments — images, PDFs, ZIPs — as Base64 before sending and decode them on arrival.

🔑

JSON Web Tokens (JWT)

JWTs use URL-safe Base64 to encode their header, payload and signature so they can be passed in HTTP headers and URL parameters without breaking routing.

🌐

HTML data URIs

Inline images, fonts and other assets in HTML or CSS using data:image/png;base64,... — no separate HTTP request required.

🔐

HTTP Basic Authentication

The Authorization: Basic header encodes username:password as Base64 — remember it's not encryption, just encoding.

☁️

Cloud config and secrets

Kubernetes secrets, Docker environment variables and CI/CD pipelines often store binary blobs (certificates, keys) as Base64 strings in YAML or JSON configs.

🔗

OAuth and API tokens

OAuth client credentials are sent as Base64-encoded strings. Many APIs use URL-safe Base64 for state parameters, nonces and pagination cursors.

Base64 adds ~33% size overhead

Input
3 bytes
→ encoded
4 chars
×1.33
Input
100 KB
→ encoded
~133 KB
×1.33
Input
1 MB
→ encoded
~1.33 MB
×1.33
Input
375 KB
→ encoded
500 KB
max input

Every 3 bytes of input become 4 Base64 characters. Factor this into payload budgets and storage sizing.

Frequently asked questions

What is Base64 encoding?

Base64 is an encoding scheme that converts binary data into a string of 64 ASCII characters (A–Z, a–z, 0–9, +, /). It is used to safely transmit binary data over channels that only handle text, such as email (MIME), JSON payloads, or HTML data URIs. Base64 is not encryption — it is trivially reversible.

What is the difference between standard and URL-safe Base64?

Standard Base64 uses + and / as the 62nd and 63rd characters, which are special in URLs. URL-safe Base64 (RFC 4648 §5) replaces + with - and / with _, and omits trailing = padding, making the output safe to include in URLs and filenames without percent-encoding.

Does Base64 make data secure?

No. Base64 is an encoding, not encryption. Anyone who sees a Base64 string can decode it instantly. It provides no confidentiality. If you need to protect data, encrypt it first, then Base64-encode if needed for transport.

How much does Base64 increase the size of data?

Base64 encoding increases data size by approximately 33%. Every 3 bytes of input become 4 Base64 characters. A 300 KB file encodes to roughly 400 KB of Base64 text.

Related developer tools

More encoding and data tools.

Base64 Decoder

Decode standard or URL-safe Base64 back to plain text.

URL Encoder

Percent-encode any string so it is safe to use inside a URL.

Hash Generator

Generate MD5, SHA-256 and SHA-512 hashes from any text.

Encode your text now

Free account. 50 credits per day. Access to 75+ tools instantly.

Create free account →