DevTools Logo

Swiss AHV Number Generator

Swiss AHV Number Generator

Generate 13-digit Swiss AHV/AVS social security numbers (756.xxxx.xxxx.xx) with the EAN-13 check — 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

    Generate an AHV number

    Input
    AHV / AVS · Generate
    Output
    756.9217.0769.85

    The official example layout: 756, nine digits and the EAN-13 check digit 5.

    Validate without separators

    Input
    7569217076985
    Output
    Valid — check digit 5

    Dots and spaces are stripped before the EAN-13 check runs.

    Reject a wrong check digit

    Input
    756.9217.0769.84
    Output
    Invalid — check digit is 4 but the first 12 digits require 5

    The validator isolates the EAN-13 failure from a wrong prefix.

    About this tool

    The Swiss AHV Number Generator produces one 13-digit AHV/AVS number in the 756.xxxx.xxxx.xx layout. The 756 prefix is Switzerland's ISO 3166 numeric code, followed by nine digits and an EAN-13 check digit.

    Since 2008 the number carries no personal information: it encodes no birth date and no gender. Generation randomizes the nine digits and derives the check digit, while validation accepts dots and spaces, rejects any other prefix and recomputes the EAN-13 check.

    These are synthetic values for QA and development, never for real applications, KYC checks, tax filings, identity documents or impersonation. A random value can coincide with 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

    • Covers AHV/AVS numbers only; Swiss UID enterprise numbers have a separate tool.
    • Validation cannot confirm that a number was issued to a person.
    • A random value can coincidentally match a real AHV number.
    • The number encodes no birth date or gender, so you cannot derive personal details from it.

    How to use this tool

    1. Choose the AHV option

      The tool is pinned to the Swiss AHV/AVS number, which uses the 756 prefix and an EAN-13 check digit.

    2. Generate a value

      Click Generate to create one 13-digit number with the 756 prefix and a computed check digit.

    3. Validate or copy

      Switch to Validate to check a pasted number, or copy the result and download it as a .txt file.

    Use cases

    HR and payroll fixtures

    Fill Swiss payroll and insurance fields with a 13-digit value that passes the EAN-13 check.

    Insurance form tests

    Exercise insurer onboarding forms that require an AHV/AVS number with the 756 prefix.

    Prefix rejection tests

    Pair a valid 756 value with a different prefix to cover the country-code rejection branch.

    AHV number structure

    PartRule
    Prefix756, Switzerland's ISO 3166 numeric code
    Body9 random digits
    Check digit13th digit, EAN-13 check
    SeparatorsDots and spaces are ignored
    Personal dataNone since 2008

    756.9217.0769.85 is the official example layout used by the tool.

    Common mistakes

    Mistake:Expecting the number to encode a birth date

    Fix:Since 2008 the AHV number carries no personal information.

    Mistake:Using a different country prefix

    Fix:756 is fixed; validation rejects any other prefix.

    Mistake:Checking only the length

    Fix:The final digit is an EAN-13 check digit and must match.

    Frequently asked questions

    Are these real Swiss AHV numbers?

    No. Every value is synthetic test data for QA and development and is not valid for insurance claims, payroll, tax filings, KYC checks, or identity documents; DevTools accepts no liability for how it is used.

    Does the AHV number encode a birth date or gender?

    No. Since 2008 the thirteen-digit number carries no personal information, so you cannot derive a birth date, gender or canton from a generated value.

    What does the 756 prefix mean?

    756 is Switzerland's ISO 3166 numeric country code. The validator rejects any other prefix, so the prefix is the quickest structural check after the length.

    Can a generated AHV number match a real person?

    It can. The EAN-13 check digit only confirms the number is well formed, so a random value may coincidentally match a real issued AHV number. Keep it in test data only.

    Why is the check digit the same as an EAN-13 barcode?

    The thirteen-digit layout uses the EAN-13 weighting, alternating 1 and 3 across the first twelve digits. The validator recomputes that digit and reports the expected value on a mismatch.

    References & standards