DevTools Logo

Malaysia MyKad Number Generator

Malaysia MyKad Number Generator

Generate 12-digit MyKad (NRIC) numbers with a real birth date and JPN place-of-birth code — synthetic test data only

Runs in your browser

For Development & Testing Purposes Only - Synthetic Mock Data

Settings

1 value

Generates one value with a valid checksum. Press ⌘/Ctrl+Enter for a fresh one.

Generated value

No value yet

Set options, then press Generate.

Generated values are valid in shape but randomized (Test Data).

Legal Disclaimer: Generated data is for software testing and validation purposes only (e.g. verifying input masks, form validation, or database seeding). It is randomly generated and not taken from any real record, but a random value can coincidentally match a real, issued number, so never use it in real applications, payments, KYC or official forms. Using it to impersonate real people or for any fraudulent activity is illegal. DevTools accepts no liability for how generated data is used.

    Examples

    Generated MyKad number

    Input
    MyKad · Generate
    Output
    770305-02-1234

    5 March 1977, Kedah code 02 and a four-digit serial.

    Validate a pasted number

    Input
    770305-02-1234
    Output
    Valid — real date and assigned place-of-birth code

    Validation confirms the date and the Kedah code; no checksum exists.

    Impossible month

    Input
    771305-02-1234
    Output
    Invalid — 771305 is not a real YYMMDD birth date

    Month 13 fails the date check before the place code is examined.

    About this tool

    The Malaysia MyKad Number Generator produces 12-digit NRIC numbers in the YYMMDD-PB-###G layout: a birth date, a two-digit place-of-birth code and a four-digit serial whose last digit is conventionally odd for men and even for women. The example 770305-02-1234 pairs 5 March 1977 with code 02, which is Kedah.

    This tool models structure only. There is no check digit in a MyKad number, so the validator checks that the first six digits form a real date and that the place-of-birth code is one the National Registration Department assigns: 01 to 16 for Malaysian states and federal territories, 21 to 59 for older state codes, 60 and above for countries of birth abroad, with some codes unused. Generated values use codes 01 to 16.

    These are synthetic values for QA and development, never for real applications, KYC checks, tax filings or identity documents; a random value can coincidentally match a real, issued number, and DevTools accepts no liability for how generated data is used. Everything runs locally in your browser.

    What this tool does not do

    • There is no check digit, so a mistyped serial cannot be detected.
    • Generated values use place codes 01–16 only; older and foreign-birth codes appear only in pasted samples.
    • Validation cannot confirm that the NRIC was issued or that it belongs to a person.
    • The tool does not model the card itself, only the number.

    How to use this tool

    1. Generate one MyKad number

      Click Generate to create a 12-digit value with a real birth date and a place-of-birth code from 01 to 16.

    2. Copy the value

      Copy the hyphenated result or download it as a .txt file.

    3. Validate a pasted number

      Switch to Validate to check the date and the place-of-birth code; there is no checksum to verify.

    Use cases

    Malaysian registration forms

    Fill NRIC fields with values that pass the date and place-of-birth checks.

    Date edge cases

    Test leap days, month ends and impossible dates against your own parser.

    Place-code handling

    Check that your form recognizes state codes, older codes and foreign-birth codes.

    MyKad structure

    PartRule
    Birth dateYYMMDD; a real calendar date is required
    Place of birth01–16 states and federal territories; 21–59 older state codes; 60+ countries
    SerialFour digits; last digit odd for men, even for women
    Check digitNone — structure only
    Format770305-02-1234
    Generated codes01–16 only

    The serial's gender convention is descriptive; the validator does not enforce it.

    Common mistakes

    Mistake:Looking for a check digit

    Fix:MyKad numbers have none; validation is structural.

    Mistake:Treating 17 as a state code

    Fix:Code 17 is unused; generated values stay within 01–16.

    Mistake:Forcing gender parity in fixtures

    Fix:The odd/even serial convention is descriptive, not a checksum the validator enforces.

    Frequently asked questions

    Are these real MyKad numbers, and can I use them in production?

    No. They are synthetic test values for QA and development, never for real applications, KYC checks, tax filings or identity documents; a random value can coincidentally match a real, issued number, and DevTools accepts no liability for how generated data is used.

    Does a MyKad number have a check digit?

    No. There is no checksum, so the validator checks the birth date and the place-of-birth code instead.

    What do the place-of-birth codes mean?

    01 to 16 are Malaysian states and federal territories, 21 to 59 are older state codes, and 60 and above are countries of birth abroad. Some codes are unused.

    How is gender encoded in the serial?

    The last digit of the four-digit serial is conventionally odd for men and even for women. The validator does not enforce that convention.

    Why does validation reject code 17?

    17 is not among the place-of-birth codes the National Registration Department assigns, so the validator reports it as unknown.

    References & standards