AHV Number Validator (Swiss Social Security Number, EAN-13 Check)
Paste one or many AHV numbers to check the length, the 756 country prefix and the EAN-13 check digit, and get each number in the official format.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Paste the numbers
Put one AHV number per line, with or without dots.
- 2Read the result
Each line shows valid or invalid with the reason.
- 3Fix typos
Use the expected check digit shown for failing numbers.
- 4Export
Download the table as CSV or copy the valid numbers.
- 5Generate test data
Use the sample button for software testing only.
About this tool
The Swiss social security number, called AHV number in German and AVS number in French and Italian, has 13 digits since 2008. It is written as 756.1234.5678.97: the prefix 756 is the ISO country code of Switzerland, nine digits identify the person without carrying any information about them, and the last digit is a check digit calculated with the EAN-13 method also used for product barcodes. Payroll staff, pension funds, health insurers and schools handle these numbers every day, and a single wrong digit can send contributions to the wrong account. This validator checks a whole list at once, explains why a number fails, shows the expected check digit and formats valid numbers with dots, so you can clean a payroll file before you upload it.
Who this is for
Payroll and HR teams, pension fund and insurance administrators, school offices and anyone who types AHV numbers into forms and wants to catch typos.
The structure
An AHV number has three parts. The first three digits are always 756. The next nine digits are a random serial number allocated by the Central Compensation Office (ZAS); unlike the old 11-digit number, they contain no date of birth, sex or name code. The thirteenth digit is the check digit.
The EAN-13 check
Starting from the left, the first twelve digits are multiplied alternately by 1 and 3 and added. The check digit is the amount needed to reach the next multiple of ten. For 756921707698 the weighted sum is 125, so the check digit is 5 and the full number is 756.9217.0769.85. A typo in one digit, and most swaps of neighbouring digits, change the sum and are detected.
What the validator reports
For each line the tool removes dots, spaces and dashes, checks that 13 digits remain, that they start with 756 and that the check digit matches. A failing number shows the expected check digit, which helps find the typo. Valid numbers can be copied in the formatted style, and the whole table can be exported as a CSV file.
Test numbers
The make samples button generates random numbers with a correct check digit for testing software. They are not real people's numbers, but they could coincide with a real one by chance, so never use them in real records.
Privacy
AHV numbers are personal data, so the tool checks them on your own device and sends nothing to a server.
Limits
A valid check digit does not prove that a number was issued or belongs to a given person; only the compensation office can confirm that. This is not an official verification.
Worked example
756.9217.0769.85 is valid: the weighted sum of the first twelve digits is 125, so the check digit is 5.
Quick facts
- Category: Legal & Government
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in English.
- Content last reviewed:
- Official source: ZAS / BSV, structure of the 13-digit AHV number (AHVN13, EAN-13 check digit, prefix 756)
Frequently asked questions
How many digits does an AHV number have?
13 digits since 2008, usually written as 756.XXXX.XXXX.XX.
What does 756 mean?
It is the ISO 3166 numeric code for Switzerland, used as the prefix of every AHV number.
How is the check digit calculated?
With the EAN-13 method: weights 1 and 3 alternate over the first twelve digits, and the check digit rounds the sum up to a multiple of ten.
Does the number reveal my birthday?
No. Unlike the old 11-digit number, the current number contains no personal information.
Can the tool confirm the owner of a number?
No. It only checks the format. Ask the compensation office for official confirmation.
Are the numbers uploaded?
No. They are checked in your browser and never leave your device.
