About Base64 Encoder / Decoder
Base64 encodes any text or binary into an ASCII representation that survives transport over channels designed for text — HTTP headers, JSON bodies, query strings, e-mail, log lines. It is reversible: decoding the output recovers the original bytes exactly. The standard Base64 alphabet uses A–Z, a–z, 0–9, `+`, and `/` plus optional `=` padding; the URL-safe variant replaces `+` and `/` with `-` and `_` so the result can sit in a URL without further encoding.
Reach for it whenever a downstream system can only carry printable ASCII: embed a small image as a `data:` URL, stuff a binary token into a JSON string, sign and serialise a JWT (which uses URL-safe Base64), or hand-craft a basic auth header. Base64 is not encryption — it does not hide the data, it only re-encodes it — so decoding requires no key. Everything runs in your browser; the input never leaves your device.
Examples
Hello, World!SGVsbG8sIFdvcmxkIQ==Standard alphabet with `=` padding. Switch to URL-safe to swap `+` for `-` and `/` for `_`.
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding, not encryption. It is reversible without a key — anyone who sees the encoded value can decode it. For confidentiality, encrypt the data first and then Base64-encode the ciphertext if needed.
What is the difference between standard and URL-safe Base64?
Standard Base64 uses `+` and `/`, both of which have meaning inside a URL. URL-safe Base64 uses `-` and `_` instead, so the output sits in a URL or filename without further percent-encoding. JWTs use URL-safe Base64 for exactly this reason.
Why are there `=` characters at the end?
They are padding to bring the length to a multiple of four characters, a quirk of the encoding's three-bytes-to-four-characters scheme. Some decoders accept padding-free Base64; some do not. URL-safe variants often omit the padding entirely.
Can I encode an image file?
This tool encodes text or arbitrary input. To encode an image as a Base64 data URL — `data:image/png;base64,...` — use the dedicated Image to Base64 tool, which adds the right MIME-type prefix automatically.
