Skip to main content

Chinese USCC Validator

Validate Chinese Unified Social Credit Codes (USCC) in real time under GB 32100-2015.

Technical Validation of Chinese USCC

Validation checks Base 31 character constraints and verifies the weighted modulo 31 checksum over the 17 preceding characters.

Essential for testing ERP systems, e-invoicing (Fapiao), and supply chain integrations with Chinese suppliers.

Anatomy & Structure of the USCC (统一社会信用代码)

The Chinese Unified Social Credit Code consists of 18 alphanumeric characters in 5 parts:

PositionFieldLengthMeaning & RuleExample
1Agency Category1 char1=Government, 5=NGO, 9=Enterprise, Y=Other9
2Entity Type1 charSubtype within category (e.g., 1=Individual Business)1
3 to 8Regional Code6 charsAdministrative division code per GB/T 2260110108
9 to 17Identification Code9 charsSequential organization number (base-31 charset)MA01ABCDE
18Check Character1 charCalculated via weighted Modulo 31 (GB 32100-2015)8

Official Algorithm (Weighted Modulo 31 — GB 32100-2015)

USCC integrity is verified via Modulo 31 using positional weights:

S = Σ C[i] × W[i] (i=1..17); R = S mod 31; Check = charset[(31 - R) mod 31]
  1. 1. Map each character to the base-31 charset (0-9 and letters A-Y, excluding I, O, Z, S, V).
  2. 2. Multiply the first 17 values by weights: W = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28].
  3. 3. Sum the products and compute R = S mod 31.
  4. 4. Compute check index: (31 - R) mod 31.
  5. 5. Retrieve check character from the base-31 charset.

Frequently Asked Questions