EditSafely

Convert UTF8 to HZ Encoding

Convert UTF8 string to HZ encoding. ASCII passes through; runs of non-ASCII characters are wrapped in ~{ ~} as 6-digit hex code points, and a literal tilde is escaped as ~~. 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 UTF8 to HZ Encoding

  1. 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. 2. Let the tool wrap non-ASCII runs. There are no settings here; plain ASCII passes through unchanged, while any run of non-ASCII characters gets wrapped in the tilde-brace GB mode markers as 6-digit hex code points, and a literal tilde is escaped as a double tilde.
  3. 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

Output

A~{000411~}

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. ASCII passes through; runs of non-ASCII characters are wrapped in ~{ ~} as 6-digit hex code points, 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 you type or drop a file, 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,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.

Related tools

All UTF-8 Tools