EditSafely

Convert HZ Encoding to UTF8

Convert HZ-encoded data (RFC 1843) to UTF8 data. Decodes ~{ ~} GB2312 runs and the ~~ tilde escape.

Runs on your device, nothing uploaded

Try:

0 chars · 0 lines

Output

Convert HZ-encoded data (RFC 1843) to UTF8 data. Decodes ~{ ~} GB2312 runs and the ~~ tilde escape.

Type or paste above to see the result here.

Example: ASCII

What you paste never leaves this tab

Convert HZ Encoding to UTF8 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 HZ Encoding to UTF8

  1. 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. 2. Let the tool reverse the escape runs. The tool finds each ~{ to ~} run, decodes each pair of characters inside as one GB2312 character (as RFC 1843 defines it), and also unescapes a doubled ~~ back into a single literal tilde character.
  3. 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

Hello ~{Dc:C~}!

Output

Hello 你好!

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 (RFC 1843) to UTF8 data. Decodes ~{ ~} GB2312 runs 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,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.

Related tools

All UTF-8 Tools →