Base64 Encoder / Decoder
Encode any text to Base64, or decode Base64 back to text. Supports standard and URL-safe variants.
—
Notes
- Standard Base64 uses
+,/,=. URL-safe replaces them with-,_and drops padding. - Supports Unicode text via UTF-8 encoding.
About Base64 Encoder / Decoder
Base64 is an encoding that converts arbitrary binary data into a safe ASCII representation using a 64-character alphabet (A–Z, a–z, 0–9, plus + and /) with = padding. It is not compression: the output is roughly 33% larger than the original bytes, but it guarantees that data survives transport through text-only channels. This tool encodes text as UTF-8 and decodes Base64 back to the original string.
Reach for Base64 when you must embed or transmit binary data inside text-based protocols: email attachments, data URIs in HTML and CSS, or binary blobs in JSON fields. The URL-safe variant replaces + and / with - and _ and strips the = padding, so the output can appear safely in URLs, query strings, and filenames. Remember that Base64 is an encoding, not encryption — anyone can decode it, so never rely on it to protect secrets or passwords.
Encoding is not encryption
Base64 transforms bytes into a 65-character alphabet so they survive transports that only handle text. It is reversible by design: anyone who can decode the output can read exactly what you encoded. Treating Base64 output as if it were a secret is the most common mistake with this tool.
Use it for embedding binary in JSON, putting a small binary blob in a URL-safe string, or representing data that must survive a text-only channel. Do not use it to hide credentials.
URL-safe variant
Standard Base64 uses `+` and `/`, both of which need percent-encoding in a URL or a filename. The URL-safe variant substitutes `-` and `_` and drops the padding `=` characters. JWTs, many cookie formats and most URL-embedded payloads use this variant.
When decoding output from elsewhere, try the standard alphabet first and switch on failure — that ordering avoids subtle corruption when a payload happens not to contain `+` or `/`.
Limits
Encoding expands the data by about a third: three bytes become four characters. For binary data this is unavoidable in a text channel, but it means Base64 is the wrong choice for large payloads where the transport already handles binary.
Next steps
- Base64 Image Viewer— view images encoded in base64
Frequently Asked Questions
How do I encode text to Base64?
Is the encoding done locally?
Is my data sent to a server?
Do I need an account or API key?
Can I use these tools offline?
All processing happens in your browser. No uploads, no tracking, no servers. Your API keys, configs, and private payloads stay private — 100% client-side.