Validate a Chinese USCC
Validate a Chinese Unified Social Credit Code by checking its allowed characters, five-part structure, MOD 31-3 checksum, and matched company record.
Validating a Chinese Unified Social Credit Code requires three separate tests: normalize the visible characters, verify the 18-character structure and checksum, then confirm that the code returns the legal entity you expected. Passing the first two tests means the code is internally consistent. It does not prove that a company exists, is active, or belongs to the supplier who sent it.
Use the correct standard
The governing national coding rule is GB 32100-2015, Coding rule of the unified social credit identifier for legal entities and other organizations. The national public standards platform lists it as current, with publication on September 17, 2015 and implementation from October 1, 2015. Open the official standard record.
Use the full term Unified Social Credit Code or USCC in the review file. “Registration number,” “tax number,” and “license number” may be used loosely in supplier messages, but the value being tested here is the current 18-character code printed on the relevant Chinese registration document.
Step 1: normalize without guessing
Convert lowercase letters to uppercase and remove spaces introduced by copying or visual grouping. Do not replace a visible character simply because another one looks more plausible. If the source is blurred, mark the position unreadable and return to the business license or original electronic file.
The code uses this 31-character alphabet:
0123456789ABCDEFGHJKLMNPQRTUWXY
The letters I, O, Z, S, and V are excluded. Their appearance means the string cannot pass the standard character-set test. This design reduces confusion with similar-looking numbers or letters, but a low-resolution image can still make an allowed character difficult to read.
Step 2: split the 18 positions
The National Development and Reform Commission explains that the 18 positions contain five parts. Read the official structural explanation.
- Position 1: registration management department code.
- Position 2: organization or entity category code.
- Positions 3-8: administrative division code of the registration authority.
- Positions 9-17: subject identifier based on the organization code.
- Position 18: check character.
Do not treat positions 3-8 as the supplier's current factory address. They describe registration administration, and the USCC remains stable when a subject changes address or legal representative. Segment meaning is useful for detecting an implausible transcription; current company facts still come from a current record.
Step 3: calculate the final character
Map each of the first 17 characters to its zero-based position in the 31-character alphabet. Multiply those values by the standard weights in order:
1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28
Add the 17 products. The check-character index is:
(31 - (total mod 31)) mod 31
Look up that index in the same 31-character alphabet. The resulting character must equal position 18. A mismatch usually means a transcription error, disallowed character, wrong length, or a string that was not issued under this coding rule.
Know what the checksum can detect
The checksum makes a typing error less likely to pass unnoticed because every body position has a defined weight. Changing one character normally changes the total and therefore the required final character. Reversing characters in different weighted positions will also often change the result. This is why the test is useful after manual transcription or OCR.
It is not a digital signature. Someone can construct a new string and calculate a mathematically correct final character, just as the training example below does. The checksum does not contact a registration authority, prove that a code was issued, identify who supplied it, reveal current status, or link it to an invoice. It only tests whether one 18-character string is consistent with the coding rule.
Do not silently “repair” a failing code by substituting an allowed character or recalculating position 18. That creates a different string with no source document. Return to the license, compare another original document, or ask the supplier for a clearer copy. Keep both variants in the review record until the issued value is established.
Worked checksum example
The following is a constructed training string, not an issued company identifier:
9 | 1 | 310000 | ABCDEFGHJ | W
Remove the separators to obtain 91310000ABCDEFGHJW. For the first 17 characters, the calculation begins (9×1) + (1×3) + (3×9) + ... + (18×28). Using every standard weight produces a total of 2,700.
2700 mod 31 = 3(31 - 3) mod 31 = 28- Alphabet index 28 is
W
The final W therefore passes the checksum for this constructed body. That result establishes only mathematical consistency. It does not turn the training string into an issued code or a company record.
Step 4: match the registry result
Search the complete USCC and record the exact Chinese legal name returned. Compare it with the business license, contract party, invoice issuer, and the company the supplier claims to represent. Also record the current registration status and the date of the search.
A valid checksum with no matching record is unresolved. A valid code returning a different company is an identity mismatch. A matching company with a non-operating or terminated status is a status issue. Keep those outcomes separate rather than reporting all three as “USCC invalid.”
Chinese registration rules require the USCC to appear on a market entity's business license. See the official license-field rule. The State Taxation Administration's English country note also explains that an entity's tax identification number generally uses the 18-character USCC under the current regime. Read the official English TIN note. Historical identifiers require separate interpretation.
Diagnose a failed or conflicting code
Use the failure type to decide what to inspect next rather than reporting a generic invalid result.
Wrong length
Remove only whitespace. If the result is still not 18 characters, check whether the document shows a historical registration or tax number, whether the image was cropped, or whether two fields were joined. Do not add leading zeroes or a guessed check character.
Forbidden character or checksum mismatch
Compare the source one position at a time. Pay particular attention to blurred letters and numbers, but never replace them from memory. If two supplier documents show different strings, identify the date and issuer of each document and request the current license.
Checksum passes but search returns no company
Confirm that the search covered the relevant entity type and that the complete code was submitted. Then search the full Chinese legal name as a separate route. Preserve “no matching record confirmed” as the result; do not downgrade it to a clean format pass.
Search returns another legal name
Keep the returned Chinese name and the supplier-provided name side by side. A former name, related company, branch, invoice issuer, and unrelated company require different explanations. The shared sales contact does not make separate entities share one USCC.
Report the result precisely
Use one of these statements in the supplier file:
- Format failed: wrong length or a character outside the standard alphabet.
- Checksum failed: the final character does not match the first 17 positions.
- Checksum passed, no entity confirmed: mathematical structure passed but no matching official record was established.
- Entity mismatch: the code returned a different legal name from the supplier document.
- Entity matched: code and Chinese legal name matched; status and transaction checks remain separate.
For the document context, return to reading the Chinese business license. For historical tax-number differences, use USCC versus China tax number. To test the entity match, search the complete USCC.
This guide validates code structure and explains identity matching. It does not authenticate a supplier, establish creditworthiness, or approve a transaction.