Try: 你好世界 汉字编码 1601 16-01 B0A1 5448 3667 2635

Result

Results appear here once you type something above

Why use this GB2312 quwei converter?

Full GB2312 table built in

All 6763 hanzi plus 682 symbol characters, from 啊 at zone 16 position 01 to 齄 at the very end of zone 87. Nothing missing.

Bidirectional conversion

Look up a character's quwei code, or turn quwei and machine codes back into text. Debugging legacy output needs both directions.

Four encodings at once

Quwei position, machine code, Unicode code point and UTF-8 bytes appear together, so you stop running four separate lookups.

Level 1 and 2 labelled

Each character is tagged as level 1 (zones 16–55), level 2 (zones 56–87) or symbol zone, so the coverage is obvious at a glance.

Lenient parsing

1601, 16-01, 16 01, B0A1, b0a1 and 0xB0A1 all work, and a contiguous string such as B0A1B0A2 is split automatically.

Local only, never uploaded

The table ships inside the page and all lookups run in your browser. Your input never reaches a server.

How to convert quwei codes in four steps

1

Pick a direction

Two tabs at the top: Character to code for lookups, Code to character for decoding. Character to code is the default.

2

Type your content

For lookups, type or paste Chinese text. For decoding, enter quwei codes such as 1601 or machine codes such as B0A1, separated by spaces.

3

Read the output

The box shows the machine code string of the whole input, or the decoded text. The table below lists all four encodings per character.

4

Copy the table

The copy table button exports the whole breakdown as tab separated text, ready to paste into Excel or a text editor.

Where quwei codes still show up

Computer science courses

Textbooks and exams still test quwei, GB and machine code conversions, and this verifies the arithmetic instantly

Embedded bitmap fonts

Legacy font libraries store glyphs in quwei order, so you need the offset before extracting a bitmap

Thermal printers and ticket machines

Some devices accept Chinese text as GB codes and require the exact byte pair per character

Legacy mojibake debugging

Given a raw double byte hex dump, decoding it tells you what the system was trying to print

Font subsetting

Split common and less common characters by zone to keep a webfont small

Studying encoding history

Compare the coverage of GB2312, GBK and GB18030 to see how Chinese encoding evolved

Quwei codes and GB2312 explained

What a quwei code actually is

GB2312 arranges characters on a 94 by 94 grid. The row is called the zone and the column the position, together forming the quwei code. Both numbers are written with two decimal digits, so 啊 is 1601, meaning zone 16 position 01. The grid is partitioned by purpose: zones 1 to 9 hold 682 symbols including punctuation, Greek and Cyrillic letters, pinyin and box drawing characters; zones 10 to 15 are empty; zones 16 to 55 hold 3755 level 1 hanzi ordered by pinyin; zones 56 to 87 hold 3008 level 2 hanzi ordered by radical; zones 88 to 94 are empty and were reserved for future expansion.

Quwei, GB code and machine code: the chain

These three terms get mixed up constantly, but they form a chain. The quwei code is the grid coordinate in decimal. The GB code adds 0x20 to both the zone and the position, producing two bytes that avoid the ASCII control range. The machine code then adds another 0x80 to each byte, forcing the high bit to 1. Combined, the machine code is simply the quwei code plus 0xA0A0. For 啊: quwei 16-01, GB code 0x3021, machine code 0xB0A1. Both offsets exist for the same reason, to keep Chinese clearly separated from ASCII so legacy systems can detect a double byte character from its high bit alone.

Why level 1 is sorted by pinyin and level 2 by radical

It was a design compromise in GB2312. The 3755 level 1 characters cover over 99 percent of everyday text, and sorting them by pinyin makes manual lookup and simple programmatic indexing easy. The 3008 level 2 characters are far less frequent and their pinyin is less intuitive, so ordering them by radical and stroke count matches how paper dictionaries are browsed. Encoding is identical for both groups; only the ordering differs. One side effect is that sorting by GB code is not sorting by pinyin, because the sequence breaks at the boundary.

GB2312, GBK and GB18030 in relation

They are layered and backward compatible. GB2312 is the 1980 standard with 6763 characters, enough for daily simplified Chinese. GBK extended it in 1995 to 21003 characters, adding traditional forms and many rare ones, and stays fully compatible, so a given character has identical bytes in both. GB18030, standardised after 2000, mixes one, two and four byte sequences and covers more than 70000 characters including all of Unicode. It is the current mandatory standard in mainland China. When a character is missing, the usual reason is not a bug but simply that it never existed in GB2312.

Why traditional characters are absent

GB2312 was designed for simplified Chinese and only includes 6763 characters, so traditional forms are largely missing. Characters such as 們, 來, 時 and 國 have no quwei code, while their simplified counterparts 们, 来, 时 and 国 do. To handle traditional text in a GB family encoding you need GBK or GB18030. This tool explicitly labels such characters as not in GB2312 rather than producing a plausible but wrong code, which matters because a wrong code is far more misleading than no code when chasing mojibake.

Is quwei code worth knowing today?

UTF-8 has taken over everyday development, so you rarely need it. It survives in a few corners: computer science exams still test the conversion, embedded bitmap fonts and thermal printers index glyphs by zone and position, legacy debugging requires mapping raw bytes back to quwei codes, and font subsetting is easiest when sliced by zone. Understanding it also explains two things people keep tripping over: why a Chinese character takes two bytes in GBK, and why mixing GBK with UTF-8 produces mojibake.

Common characters at a glance

Character Quwei Machine code Unicode UTF-8 bytes Coverage
中54-48D6D0U+4E2DE4 B8 ADLevel 1
国25-90B9FAU+56FDE5 9B BDLevel 1
人40-43C8CBU+4EBAE4 BA BALevel 1
民35-81C3F1U+6C11E6 B0 91Level 1
你36-67C4E3U+4F60E4 BD A0Level 1
好26-35BAC3U+597DE5 A5 BDLevel 1
汉26-26BABAU+6C49E6 B1 89Level 1
字55-54D7D6U+5B57E5 AD 97Level 1
编17-64B1E0U+7F16E7 BC 96Level 1
码34-75C2EBU+7801E7 A0 81Level 1
。01-03A1A3U+3002E3 80 82Symbol
,03-12A3ACU+FF0CEF BC 8CSymbol
 01-01A1A1U+3000E3 80 80Symbol (ideographic space)

GB2312 quwei converter FAQ

Q: How do I turn a quwei code into a Chinese character?
A: A quwei code has a two digit zone number and a two digit position number, for example 啊 sits at zone 16 position 01 and is written 1601 or 16-01. Switch to the code to character mode, paste 1601 and the character appears. Machine codes such as B0A1 and long contiguous strings like B0A1B0A2 are also accepted.
Q: What is the relationship between quwei code and machine code?
A: The machine code is the quwei code with 0xA0 added to each of its two bytes. For 啊 at zone 16 position 01, 16 plus 0xA0 gives 0xB0 and 01 plus 0xA0 gives 0xA1, so the machine code is B0A1. Subtracting 0xA0 from both bytes returns the quwei code. The offset forces the high bit of each byte to 1, keeping Chinese away from the ASCII range so old systems could tell a double byte character by its high bit.
Q: Why do some characters have no quwei code?
A: GB2312 was fixed in 1980 and only covers 6763 hanzi. Traditional characters, rare characters and many name characters are missing. Those live in the GBK or GB18030 extensions. This tool labels them as not in GB2312 instead of inventing a wrong code, which matters when you are debugging garbled text.
Q: What is the difference between level 1 and level 2 hanzi?
A: Zones 16 to 55 hold the 3755 level 1 hanzi, ordered by pinyin and covering the most frequently used characters. Zones 56 to 87 hold the 3008 level 2 hanzi, ordered by radical and stroke count. Together they make up the 6763 characters. The encoding works the same for both; only the ordering and frequency differ.
Q: How do GB2312, GBK and GB18030 differ?
A: GB2312 is the original simplified Chinese set with 6763 characters. GBK extended it in 1995 with full backward compatibility to 21003 characters, adding traditional and rarer forms. GB18030, standardised after 2000, uses a mix of one, two and four byte sequences and covers more than 70000 characters including all of Unicode. They are layered: anything encoded in GB2312 has exactly the same bytes in GBK and GB18030.
Q: Is quwei code still relevant today?
A: Rarely in everyday development, but it survives in a few places. Chinese computer courses and exams still test the conversion. Embedded bitmap font libraries, thermal printers and ticket machines often index glyphs by quwei position. Debugging legacy systems requires mapping raw double bytes back to quwei codes. And font subsetting is easiest when you slice by zone.
Q: Is my input stored anywhere?
A: No. The whole GB2312 table is embedded in the page script and every lookup happens in your browser. Nothing you type is sent to a server or recorded.