Base64 Encoder / Decoder
Encode and decode Base64, including URL-safe text. UTF-8 is handled as bytes.
Added 2026-10-23
What it does
Base64 Encoder / Decoder turns bytes into the Base64 alphabet and back in this tab. Text is encoded as UTF-8 bytes, so a string such as Hello, 世界 is not treated as a list of UTF-16 code units. URL-safe mode uses - and _ instead of + and /. Encoding can omit padding or wrap lines at 76 characters. Decoding accepts missing padding and whitespace. Bytes that are not valid UTF-8 are shown as hex instead of a replacement character. Base64 is not encryption: anyone can reverse it. It is also not percent-encoding. A query string still needs URL encoding for spaces and reserved characters.
How to use it
- Choose encode or decode.
- URL-safe uses - and _ instead of + and /. Padding and 76-character lines are optional when encoding.
- Decoding accepts missing padding and whitespace. Bytes that are not UTF-8 are shown as hex.
Common mistakes
- Base64 is not encryption. Anyone can decode it. Do not use it to hide passwords or tokens.
- URL-safe alphabet. JWT segments use - and _ and often omit padding. The decoder accepts that form.
Encoding and decoding stay in this tab. The text is not uploaded.
Related guides
- Base64 is not URL encoding
Base64 maps bytes to an alphabet. URL encoding percent-escapes characters. A query string needs the second, not the first.