Playground
Enter an ID number to validate and parse it in real time. All computation runs locally in your browser — nothing is uploaded.
Province
-
Birth Date
-
Gender
-
Age
-
15-digit
-
18-digit
-
Masked (mask)
-
Test Numbers
Click a number to fill it in (all are randomly generated valid test data, not real identities):
Equivalent Code
typescript
import { parse, mask } from 'china-id-card';
const info = parse('622922197808118498');
// → { isValid, province, birthDate, gender, age, fifteenDigit, eighteenDigit }
mask('622922197808118498'); // → '622***********8498'Use it in your project
pnpm add china-id-card brings the same capabilities to your codebase. See Getting Started.