Coverage · China
Chinese resident ID number detection and redaction
OpenAnonymizer finds the Chinese resident identity card number in text and replaces it with a placeholder. The number is confirmed by its official label and its check digits are verified. It runs on a CPU, with no GPU and no API calls.
At a glance
- Country
- China CN
- Format
- resident identity card number居民身份证号码
- Placeholder
- Each distinct value gets its own number: CN_RIC_1, CN_RIC_2, and so on.
- How it is confirmed
- Official label and checksum
- Used for
- Identifying residents of mainland China, on the resident identity card and in most official records.
About the resident identity card number
The number is 18 characters: a six-digit address code, the date of birth as YYYYMMDD, a three-digit order code (odd for men, even for women), and a check character, which is a digit or X.
- In
- 身份证号: 110105198001011238
- Out
- 身份证号:
How OpenAnonymizer handles it
Checked by checksum. The format's check digits are verified, so most mistyped or made-up numbers fail. A number with the right label and shape is still masked when its checksum fails, so a typo doesn't let it through.
- It runs locally on a CPU, with no GPU and no API calls, so the text never leaves your machine.
- Every package ships every detector, so this format is covered in each of them.
- It covers 34 languages.
Related formats
The same country, or the same kind of number elsewhere.