Symptom: Chinese becomes a string of %XX
You copy https://example.com/search?q=中文 somewhere and the Chinese turns into https://example.com/search?q=%E4%B8%AD%E6%96%87. Rest assured: this is completely normal, not mojibake.
Why Chinese must be encoded into %XX
URL spec (RFC 3986) only allows a small set of ASCII characters directly in an address (letters, digits, and a few symbols). Chinese, spaces, and emoji are not on the whitelist. To fit any character into a URL, percent-encoding was invented:
- Convert the character to UTF-8 bytes;
- Write each byte as
%+ two hex digits.
So "中" in UTF-8 is three bytes E4 B8 AD, which becomes %E4%B8%AD.
| Original | UTF-8 bytes | Encoded |
|---|---|---|
| 中 | E4 B8 AD | %E4%B8%AD |
| space | 20 | %20 (or +) |
| A | 41 | A (no encoding needed) |
How to decode it back
Reverse the operation: turn %XX back into bytes, then read as UTF-8. Open the URL Encode/Decode tool on ToolVault:
- Paste the
%XXstring into the input; - Choose "decode" and get readable Chinese instantly;
- Conversely, choose "encode" to turn Chinese into a valid URL;
- Processed locally, never uploaded.
When not to encode (and caveats)
- Path vs query: both
/搜索and?q=搜索can be encoded and both are safe; unencoded may be rejected by some servers. - Ambiguity of
+: in query strings+is often treated as a space, so prefer%20over+for spaces to avoid ambiguity. - Reserved chars:
?&=/#have syntactic meaning in URLs; encode them only when you mean the characters themselves.
FAQ
Why do some sites show Chinese directly while others show %XX?
Depends on whether the browser/server does a "display-layer" decode for you. Underneath, transmission is still encoded; the interface just restores it for viewing. Both are the same data presented differently.
Will the encoded link still open normally?
Yes. The server decodes %E4%B8%AD back to "中" automatically, with no effect on the final access.
Is Base64 the same as URL encoding?
No. URL encoding percent-encodes bytes for URIs; Base64 turns arbitrary data into printable text (see Base64 tool). Different purposes.
Provided by ToolVault. Related tools: URL Encode/Decode, Base64 Encode/Decode, JWT Decoder. Visit the home page for more developer tools.
Related Tools
Related Articles
Character Encoding Troubleshooting Handbook: Mojibake, URL Encoding, and Base64 Explained
Chinese turning into ??? or é”±? %E4%B8%AD unreadable? This handbook classifies by symptom — real mojibake, URL percent-encoding, Unicode escaping, and Base64 with Chinese, plus an encoding primer and a debugging workflow.
Base64 Decode Shows Garbled Text or Black Question Marks for Chinese — How to Fix
Base64 decode turns Chinese into mojibake or black question marks? Explains the root cause — Base64 encodes bytes, not characters — and gives command-line, code, and online-tool fixes, all processed locally.
How to Batch Encode Multiple Files or Texts to Base64 (No Script Needed)
Need to convert dozens of images or strings to Base64 at once? Learn batch Base64 encoding and step-by-step how to do it locally without uploading files or writing scripts.