Finland HETU Validator

Validate a Finnish henkilötunnus with the full DVV mod-31 algorithm.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Finland HETU validator

The henkilötunnus (HETU) is Finland’s national personal identity code, issued to every resident by the Digital and Population Data Services Agency (DVV, formerly VRK). It appears on identity cards, passports, healthcare records, tax returns, and bank accounts. The 11-character code packs four pieces of information into a compact, human-readable string: the holder’s date of birth, the century they were born in, a serial number that encodes gender, and a single control character that lets any application verify the code without contacting a server.

This tool implements the full official DVV validation algorithm so you can check whether a HETU is internally consistent, see exactly which step passes or fails, and extract the embedded birth date and gender — all without sending any data over the network.

How the format works

A HETU always has exactly 11 characters in this structure:

D D M M Y Y C Z Z Z Q
  • DDMMYY — day, month, and last two digits of birth year, all zero-padded.
  • C — century marker: + for 1800–1899, - for 1900–1999, A for 2000–2099.
  • ZZZ — three-digit individual number, 001–899 for real persons (900–999 reserved for test IDs). Odd = male, even = female.
  • Q — control character produced by the mod-31 algorithm described below.

The mod-31 control character algorithm

  1. Strip the century marker and concatenate the remaining nine digits: DDMMYY + ZZZ.
  2. Interpret the nine-digit string as an integer N.
  3. Compute remainder = N mod 31. The result is a number from 0 to 30.
  4. Look up remainder as an index into the 31-character table:
Index:  0  1  2  3  4  5  6  7  8  9
Chars:  0  1  2  3  4  5  6  7  8  9

Index: 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Chars:  A  B  C  D  E  F  H  J  K  L  M  N  P  R  S  T  U  V  W  X  Y

The letters I, O, Q, and Z are absent to avoid confusion with digits 1, 0, 9, and 2.

The final character of the HETU must equal the character at the computed index.

Example — an obviously fake HETU

Consider the fictional HETU 131052-308T:

PartValueMeaning
DD13Day 13
MM10October
YY52Year …52
C-Century 1900–1999, so born 1952
ZZZ308Even → female
QTControl character to verify

Calculation: join the nine digits → 131052308. Compute 131052308 mod 31 = 25. Index 25 in the table is T. The given control character is T — match, so the code is valid.

This is a made-up number used only to demonstrate the algorithm. Never use it in any real system.

What the validator reports

  • Birth date — the full four-digit year reconstructed from the century marker.
  • Gender — derived from the parity of the individual number.
  • Test identity flag — raised when the individual number is 900–999.
  • Nine-digit base number and remainder — shows exactly how the mod-31 was computed.
  • Expected vs. given control character — the specific character from the lookup table compared to what was entered.

The validator runs every check locally. No HETU, partial input, or result is ever sent to a server.

Ad placeholder (rectangle)