Base64 string converter
Encode text to Base64 or decode Base64 back to text, with URL-safe alphabet and full Unicode support.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
What this tool does
- Move binary-unfriendly text through channels that only accept ASCII: HTTP headers, URL query strings, JSON strings, email headers and XML attributes.
- Decode the unreadable-looking fields in JWTs, Basic Auth headers, data URLs and raw email sources to see what they actually contain.
- Estimate the original size of an encoded payload: Base64 output is about a third longer than the input, so the ratio tells you roughly how much data you are looking at.
- Turn invisible characters (newlines, tabs, control bytes) into copyable visible text you can paste into a chat or a ticket.
Example
Input
Hello, UniKit! 你好,工具站!
Output
SGVsbG8sIFVuaUtpdCEg5L2g5aW977yM5bel5YW356uZ77yB
Chinese characters and emoji are UTF-8 encoded before Base64, so decoding with a different charset produces mojibake.
Frequently asked questions
Is Base64 encryption?
No. Base64 maps arbitrary bytes onto 64 printable characters and anyone can reverse it with one line of code, so it provides no confidentiality at all. Use real encryption such as AES when secrecy matters; Base64 only makes data safe to transport.
Why does the encoded string end with one or two equals signs?
Base64 encodes every 3 bytes into 4 characters, so when the input length is not a multiple of three it pads with =. One = means the input length mod 3 is 2, two = means it is 1. The padding carries no information, which is why URL-safe variants drop it.
What is the URL-safe alphabet and when should I use it?
Standard Base64 uses + and /, which have special meaning inside URLs and get mangled in query strings. The URL-safe mode replaces them with - and _ and removes the = padding, exactly as RFC 4648 defines base64url — that is what JWTs and data URLs use.
Why does decoding fail or return mojibake?
Three common causes: whitespace or line breaks mixed into the string (enable "ignore whitespace"); the original text was encoded in GBK or another non-UTF-8 charset, so convert it first; or the string is truncated and its length cannot be padded to a multiple of four.
Is my data uploaded anywhere?
No. Encoding and decoding run entirely in your browser with JavaScript, the page makes no network requests, and your input is never logged. It also works with the network disconnected.
Keywords:base64base 64encodedecode编码解码url safeunicodebase64 转换