Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 strings back to text instantly. Supports standard and URL-safe Base64. Browser-only — nothing is sent to any server.
URL-safe Base64
Replaces + with -, / with _, removes = padding
39 bytes
52 chars
SGVsbG8sIFdvcmxkISBUaGlzIGlzIGEgQmFzZTY0IGV4YW1wbGUu
What is Base64?
Base64 is an encoding scheme that converts binary data (or text) into a string of ASCII characters using 64 printable symbols: A–Z, a–z, 0–9, and two additional characters (+ and / in standard Base64). It's designed to transmit data safely in contexts that only support text — like email, JSON, and HTML attributes.
Base64 is not encryption — it's just a format change. Anyone can decode it in seconds. Never use it to secure sensitive data.
Common uses of Base64
- Email attachments — MIME encoding converts binary files to Base64 for transmission
- Data URLs — Embed images directly in HTML/CSS (
data:image/png;base64,…) - HTTP Basic Auth — Credentials are Base64-encoded before being sent in the Authorization header
- JWTs — JSON Web Token headers and payloads are Base64URL-encoded
- Binary in JSON/XML — Encode arbitrary bytes for storage in text-only formats
- TLS certificates — PEM format wraps DER binary certificates in Base64
Standard vs URL-safe Base64
Standard Base64 — Uses +, /, and = padding. Safe for email and file storage but must be percent-encoded in URLs (%2B, %2F, %3D).
URL-safe Base64 — Replaces + with -, / with _, removes = padding. Safe in URLs, query strings, filenames, and HTTP headers. Used in JWTs and OAuth 2.0.