ENCODING
Encoding, everything devs need.
Convert between Base64, URL, HTML entity, Unicode escape and Hex — locally in your browser.
Text ⇄ Base64 (UTF-8 safe).
Most tools process data locally; see this page for details
What can this tool do?
Convert between common text encodings: Base64, URL encoding, HTML entity escaping, Unicode (\uXXXX) escaping and hex bytes — handy for debugging, all local.
FAQ
What is the difference between URL encoding and Base64?
They serve entirely different purposes. URL encoding (%20, %E4%B8%AD) simply escapes characters so they fit in a URL — a reversible representation used for query parameters. Base64 encodes binary as text so binary can travel where only text is allowed (data URLs, email attachments, keys). It expands the data by roughly 33% and is not encryption.
How do I know garbled text is an encoding problem?
The tell is fixed-position garbage such as æ£ç»œ or runs of question marks — the byte sequence is unchanged but being interpreted with the wrong encoding. The usual cause is content stored as GBK being read as UTF-8 or vice versa. The Unicode escape option (\uXXXX) helps you analyse the bytes to pinpoint the mismatch.
Is the conversion two-way?
All five features work both ways: Base64, URL encoding, HTML entities, Unicode escapes and hex bytes. Paste into the input box and the matching result appears automatically; to reverse it, paste into the same encoding again.
示例与注意事项Example & notes
一个例子A worked example
旧系统导出的一串「测试」是乱码:按「被当成 Latin-1 解读的 UTF-8」还原,得到正确的「测试」。The garbled string "测试" from a legacy export is UTF-8 misread as Latin-1 — converting it back yields 测试.
注意事项Things to watch
- 乱码的本质是「用错了解码表」,先判断原始编码再转换。Garbled text means the wrong decoding table was used — identify the original encoding first.
- GBK 与 Big5 容易混用,简繁场景务必选对,否则会出现问号或生僻错字。GBK and Big5 are easily confused; pick the right one or you get question marks and odd characters.
- 部分转换不可逆,操作前请备份原文。Some conversions lose information — keep the original.
相关问答More Q&A
怎么判断原始编码?How do I identify the source encoding?
常见做法是逐个尝试并用可读性验证,页面提供一键轮换尝试。Try the candidates and judge by readability — the page can rotate through them for you.
支持批量转换吗?Does it handle batches?
支持按行批量转换,适合处理整份导出文件。Yes — convert line by line, which suits whole exports.