What Han Xin Code is
Han Xin Code is a 2D matrix barcode developed in China (GB/T 21049) that can encode ASCII text, GB18030 Chinese characters, and binary data in a single compact symbol.
Generate it now
Enter your text (ASCII or Chinese characters) to see a live preview.
Valid input
Han Xin Code accepts ASCII text, GB18030-encoded Chinese characters, and binary data; bwip-js automatically selects the smallest symbol version that fits your data and error-correction level.
Key options
Supported options include eclevel (error-correction level L1 through L4 -- a different scale from QR Code's L/M/Q/H). bwip-js's own real default is L2.
Output and printing
Export SVG for packaging/label artwork or PNG for a quick proof.
Common uses
Han Xin Code is used in China for logistics, product traceability, and government/postal applications needing a compact 2D symbol that natively handles Chinese-character payloads.
Example
See the live preview above, seeded with a bwip-js-verified valid value.
Size guidance
Raising eclevel increases the symbol's error-correction overhead, which can push the encoder to select a larger symbol version for the same payload.
Troubleshooting
A rejected value is almost always a character or byte sequence that does not decode cleanly as GB18030 text.
Related formats
Related formats: QR Code (a globally common 2D matrix symbol with its own damage-tolerance levels, on a different L/M/Q/H scale) and Data Matrix (another compact 2D symbol used for similar tracking/traceability jobs).
FAQ
Can Han Xin Code store Chinese characters more efficiently than QR Code?
Han Xin Code was designed with native GB18030 Chinese-character encoding in mind, but this generator does not carry an independent, sourced capacity comparison against QR Code's own Chinese-character encoding mode -- verify capacity for your specific payload against bwip-js's own version-selection behavior rather than relying on a general claim.