# NIC Number Decoder - Birth Date, Gender, Old and New Format

Page: https://hirantha.me/tools/nic-decoder
Part of: Hirantha Sandaruwan Lakshan free tools (https://hirantha.me/tools)
Updated: 2026-10-13

Read the birth date, gender and age from a Sri Lankan NIC number, old or new format, one or a whole list.

This is a free tool that runs in the browser: open the page to use it. File tools process files on the visitor's own device; files are never uploaded or stored. No account, sign-up, payment or watermark.

Type or paste a Sri Lankan National Identity Card number to see the birth date, day of the week, gender and age it encodes, and the same number in the other format. Paste a whole list to decode them all at once. The work is done in your browser, so no number is sent anywhere.

A NIC number is not random. The old format is nine digits and a letter, such as 911042754V. The first two digits are the birth year (91 means 1991), the next three are the day of the year, the next three are a serial number, and the last digit is a check digit, followed by V or X. The new format has twelve digits: a four-digit year, three digits for the day, a four-digit serial number and a check digit.

For women, 500 is added to the day number. A day code of 104 is a man born on the 104th day of the year; 604 is a woman born on that day.

The day count has one quirk. February is always counted as having 29 days, so day 60 is 29 February (which exists only in a leap year) and 1 March is day 61 in every year. In a year that is not a leap year, a day code from 61 onward is therefore one more than the real day of the year, and the decoder takes that into account.

To turn an old number into a new one, put 19 in front of the year, and put a 0 after the three day digits. The reverse works only for people born in the 1900s whose serial number starts with a 0. The check digit's rule is not published, so it is shown but not verified: a well-formed result means the number has the right shape and describes a possible birth date, not that a card with that number exists.

The two NIC layouts:
| Part | Old (9 digits + letter) | New (12 digits) |
| --- | --- | --- |
| Birth year | 2 digits (19xx) | 4 digits |
| Day of the year (+500 for women) | 3 digits | 3 digits |
| Serial number | 3 digits | 4 digits |
| Check digit | 1 digit | 1 digit |
| Ending | V or X | none |

Q: Is my NIC number sent anywhere?
A: No. The number is decoded in your browser as you type and is not sent to this site or anyone else. Even so, treat a NIC as personal information and do not post it publicly.

Q: Does a valid result mean the NIC is real?
A: No. It means the number is well formed and describes a possible birth date. The check digit's rule is not published, so it cannot be verified, and only the Department for Registration of Persons can confirm that a card exists.

Q: Why does a woman's number have 500 added?
A: It is how the format records gender: the day of the year is stored as 1 to 366 for men and 501 to 866 for women. A day code above 500 means female.

Q: Why is the date one day off from what I calculated?
A: February is always counted as having 29 days in the NIC day numbering. In a year that is not a leap year, every date from 1 March is one number higher than a plain day count. Counting 104 days from 1 January 1991 gives 14 April, but the NIC means 13 April.

Q: What do V and X at the end mean?
A: They only appear in the old format. V is the usual ending; X is also seen. They are commonly explained as relating to voting eligibility, but there is no official specification to cite, so the decoder does not interpret them.

Q: Can I convert a new NIC back to the old one?
A: Only when the person was born in the 1900s and the first digit of the four-digit serial is 0. Otherwise there is no old-format equivalent.

Sources: National identity card (Sri Lanka) - Wikipedia (https://en.wikipedia.org/wiki/National_identity_card_(Sri_Lanka)); slnic, an open-source NIC parser (notes on the layout) (https://pypi.org/project/slnic/)

Related tools:

- [Gratuity calculator (Sri Lanka)](https://hirantha.me/tools/gratuity-calculator.md): Work out gratuity under the Payment of Gratuity Act: half a month's pay for each completed year after five years.
- [Net salary calculator (Sri Lanka)](https://hirantha.me/tools/salary-calculator.md): Take-home pay after EPF and APIT income tax, plus what the employer really pays.
- [Age calculator (years, months and days)](https://hirantha.me/tools/age-calculator.md): Exact age in years, months and days, days, weeks and hours lived, the next birthday and its weekday, and the age on any date.
- [Sri Lanka phone number checker](https://hirantha.me/tools/sri-lanka-phone-number-checker.md): Check a Sri Lankan phone number, see whether it is mobile or landline, and get the +94 and local formats. Paste a list to check many at once.
- [Days between two dates calculator](https://hirantha.me/tools/date-difference-calculator.md): Count the days between two dates in weeks, months and years, with business days, an end-date option and Sri Lanka holidays left out if you like.
