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.
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
A–Z a–z 0–9 + / =
= to a multiple of 4
+ and / are unsafe in URLs — need percent-encoding
SGVsbG8gV29ybGQ=
Use for: email (MIME), JSON, XML, binary-in-text storage.
URL-safe Base64
RFC 4648 §5 — for URLs and filenames
A–Z a–z 0–9 - _
= stripped
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
Every 3 bytes of input become 4 Base64 characters. Factor this into payload budgets and storage sizing.
Frequently asked questions
Related developer tools
More encoding and data tools.
Encode your text now
Free account. 50 credits per day. Access to 75+ tools instantly.
Create free account →