Convert UTF8 to HZ Encoding
Convert UTF8 string to HZ encoding (RFC 1843). ASCII passes through; Chinese text is wrapped in ~{ ~} as GB2312 byte pairs, and a literal tilde is escaped as ~~. Runs entirely in your browser, so your data never leaves your device.
Runs on your device, nothing uploaded
0 chars · 0 lines
Output
Convert UTF8 string to HZ encoding (RFC 1843). ASCII passes through; Chinese text is wrapped in ~{ ~} as GB2312 byte pairs, and a literal tilde is escaped as ~~.
Type or paste above to see the result here.
What you paste never leaves this tab
Convert UTF8 to HZ Encoding is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, the text you paste is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.
- No upload
- No length limit
- Works offline once loaded
- Nothing stored or logged
How to use Convert UTF8 to HZ Encoding
- 1. Paste the UTF-8 text. Type or paste the text you want encoded, whether it is plain ASCII or mixed with Chinese characters, into the input pane.
- 2. Let the tool wrap non-ASCII runs. There are no settings here; plain ASCII passes through unchanged, while any run of Chinese (GB2312) characters gets wrapped in the tilde-brace GB mode markers as 7-bit byte pairs, characters outside GB2312 become ? and are listed, and a literal tilde is escaped as a double tilde.
- 3. Copy the HZ-encoded result. The output pane shows the HZ-encoded string, ready to send to a system that expects this 7-bit safe transport encoding for Chinese text.
When to use Convert UTF8 to HZ Encoding
Convert UTF8 to HZ Encoding produces the 7-bit safe HZ-GB2312 format designed for exchanging Chinese text over channels, like early Usenet and email, that only trusted plain ASCII bytes. Plain ASCII content passes through untouched while non-ASCII runs get wrapped in the tilde-brace escape sequence.
- Recreating a historical Usenet posting format. You are archiving or reproducing old Chinese-language Usenet posts that relied on HZ encoding to survive 7-bit mail relays, and need to generate a correctly formatted sample.
- Testing a legacy mail system's HZ support. You maintain a mail gateway that still needs to interoperate with systems expecting HZ-GB2312 for Chinese content, and want to generate known-good test messages.
- Studying how 7-bit-safe Unicode escaping schemes work. You are researching pre-UTF-8 approaches to safely transmitting non-Latin scripts and want a working example of the tilde-brace escape mechanism HZ uses.
Examples
ASCII
Input
Hi
Output
Hi
Mixed
Input
Hello 你好!
Output
Hello ~{Dc:C~}!Tilde
Input
a~b
Output
a~~b
About the Convert UTF8 to HZ Encoding tool
Convert UTF8 to HZ Encoding does its work locally, right in the browser. Convert UTF8 string to HZ encoding (RFC 1843). ASCII passes through; Chinese text is wrapped in ~{ ~} as GB2312 byte pairs, and a literal tilde is escaped as ~~. There is no upload step, no queue and no account, and your data never travels over the network.
It belongs to the UTF-8 Tools collection on EditSafely, a set of 69 small, focused UTF-8 utilities that share the same instant, private workspace.
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.
Running locally also makes the tool fast and dependable: results appear as soon as your input does, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.
Frequently asked questions
Is Convert UTF8 to HZ Encoding free to use?
Yes, it is completely free. All 2,943 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; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.
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.