Convert HZ Encoding to UTF8
Convert HZ-encoded data to UTF8 data. Reverses ~{ ~} GB-mode runs (6-digit hex code points) and the ~~ tilde escape. Runs entirely in your browser, so your data never leaves your device.
0 chars · 0 lines
Output
The result appears here as you type.
How to use Convert HZ Encoding to UTF8
- 1. Paste the HZ-encoded text. Drop text using the HZ-GB2312 scheme into the input pane. Plain ASCII passes through untouched, while GB-mode runs wrapped in ~{ and ~} carry Chinese characters.
- 2. Let the tool reverse the escape runs. The tool finds each ~{ to ~} run, reads the 6-digit hex code points inside, and also unescapes a doubled ~~ back into a single literal tilde character.
- 3. Copy the resulting UTF8 text. The output pane shows the decoded string with Chinese characters restored. Copy it once the HZ escape sequences have been converted to plain UTF8.
When to use Convert HZ Encoding to UTF8
Convert HZ Encoding to UTF8 decodes the HZ-GB2312 scheme once common for sending Chinese text over 7-bit-only channels like early email and Usenet. HZ marks runs of non-ASCII text with ~{ and ~} delimiters and escapes a literal tilde as ~~, and this tool reverses both rules to recover the original UTF8 text.
- Reading an archived Usenet or email message. An old Chinese-language newsgroup post or email from the 1990s uses HZ encoding because the transport only allowed 7-bit ASCII. Decoding it here recovers the original characters for archival or research purposes.
- Migrating legacy Chinese text data. A data migration project finds old records still stored in HZ-GB2312 format from a pre-Unicode era system. Converting sample records here confirms the decoding logic before running it across the full dataset.
- Verifying a tilde-escaping implementation. You are implementing an HZ decoder and want to confirm your handling of the doubled tilde escape matches the specification. Testing edge cases here gives you a reference to check against.
Examples
ASCII
Input
Hi
Output
Hi
Mixed
Input
A~{000411~}Output
AБ
Tilde
Input
a~~b
Output
a~b
About the Convert HZ Encoding to UTF8 tool
Convert HZ Encoding to UTF8 runs as plain JavaScript in your browser tab, with no server behind it. Convert HZ-encoded data to UTF8 data. Reverses ~{ ~} GB-mode runs (6-digit hex code points) and the ~~ tilde escape. Whatever you put in stays on your device from start to finish.
The tool is part of EditSafely's UTF-8 Tools section, 69 single-purpose utilities built around the same idea: open the page, get the result, keep your data to yourself.
There is nothing to configure. Provide the input and the result appears on its own. 3 worked examples further down the page show exactly what the tool produces for real inputs.
That local-first design has practical benefits beyond privacy. The tool keeps working on a flaky connection once the page has loaded, results are instant because nothing round-trips to a server, and it is safe to use with confidential material.
Frequently asked questions
Is Convert HZ Encoding to UTF8 free to use?
Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
How much text can I process at once?
There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.
Do I need to sign up or install anything?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.