toolember

Developer

Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 back to readable text, instantly and in your browser. UTF-8 safe (emoji and non-Latin text work), with an optional URL-safe alphabet for tokens and query strings. Nothing is uploaded, no sign-up.

0 characters

Output appears here as you type.

Common uses

Data URIs

Embed a small image or font directly in CSS/HTML as data:...;base64,... to save a request.

JWT & tokens

JSON Web Tokens are URL-safe Base64. Decode the header/payload segments to inspect claims (they are not encrypted).

API payloads

Move binary data through JSON or XML fields that only accept text, without corruption.

Basic Auth headers

The Authorization: Basic header is base64("user:pass"). Decode one to see the credentials it carries.

Email attachments

MIME encodes attachments as Base64 so binary files survive text-only mail transport.

Config & secrets files

Kubernetes Secrets and many config formats store values as Base64. Decode to read, encode to set.

Standard vs URL-safe Base64

Both encode the same data; they differ only in three output characters. Decoding here accepts either, and restores missing padding automatically.

  • Standard

    Uses + and /, pads the end with =. The default for email, data URIs, and most APIs.

  • URL-safe

    Replaces + with -, / with _, and drops = padding, so it is safe in URLs, filenames, and JWTs.

Frequently Asked Questions

What is Base64 and what is it used for?
Base64 is a way to represent binary data (or text) using only 64 printable ASCII characters (A-Z, a-z, 0-9, + and /). It is used to safely embed data in places that only accept text, for example data URIs for images in CSS/HTML, email attachments (MIME), JSON or XML payloads, and Basic Authentication headers. It is an encoding, not encryption, so it provides no security on its own.
How do I encode text to Base64?
Choose Encode, then type or paste your text. The Base64 output updates instantly as you type, no button needed. Text is treated as UTF-8, so emoji and non-Latin characters (e.g. 世界, café) encode correctly. Click Copy to grab the result.
How do I decode a Base64 string?
Choose Decode and paste the Base64 string. The decoded text appears immediately. The tool auto-detects URL-safe Base64 (using - and _) and restores missing padding, so it works whether or not the string ends in = signs. If the string is not valid Base64, you get a clear error instead of garbled output.
What is URL-safe Base64?
Standard Base64 uses + and / and pads with =, but those characters have special meaning in URLs and filenames. URL-safe Base64 replaces + with -, / with _, and drops the = padding, so the result can be dropped straight into a URL, query string, or JWT. Tick the URL-safe option when encoding; decoding handles both variants automatically.
Is my data sent to a server?
No. All encoding and decoding runs entirely in your browser using the built-in btoa/atob functions and the TextEncoder/TextDecoder APIs. Nothing you type is uploaded, logged, or stored. This matters when you are handling tokens, credentials, or private payloads.
Why does my Base64 look longer than the original text?
Base64 represents every 3 bytes of input as 4 output characters, so the encoded string is about 33% larger than the original. That overhead is the trade-off for being able to move binary-safe data through text-only channels.
Is Base64 encryption? Is it secure?
No. Base64 is reversible by anyone, it only changes the representation, not the meaning. Never use it to protect passwords or secrets. If you need confidentiality, use real encryption; if you need integrity, use a hash (see our Hash Generator).