Portugal NISS Generator
Generate 11-digit Portuguese social security numbers (NISS) for people and companies — synthetic test data only
For Development & Testing Purposes Only - Synthetic Mock Data
Settings
1 valueGenerates 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).
Examples
Generate a personal NISS
NISS · person · Generate12345678902The leading 1 marks a person and the final 2 is the weighted mod-10 check digit.
Validate a pasted value
12345678902Valid — person number with check digit 2The validator recomputes the weighted sum over the first ten digits.
Reject a wrong prefix
31234567890Invalid — a NISS starts with 1 (person) or 2 (company); this starts with 3The prefix test fails before the check digit is evaluated.
About this tool
The Portugal NISS Generator produces one 11-digit NISS (Número de Identificação da Segurança Social), the social security number used by people and companies. Choose the person option for a value starting with 1 or the company option for one starting with 2.
The check digit is 9 minus the weighted sum of the first ten digits modulo 10, using weights 29, 23, 19, 17, 13, 11, 7, 5, 3 and 2. Generation derives that digit, and validation recomputes it after stripping spaces.
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 NISS only; NIF and NIPC have a separate tool.
- Validation checks structure and check digit, not registration status.
- A random value can match a real person's or company's NISS.
- The tool does not model contribution history or benefit eligibility.
How to use this tool
Pick person or company
Choose the person option for a NISS starting with 1, or the company option for one starting with 2.
Generate a value
Click Generate to create one 11-digit number and append the weighted mod-10 check digit.
Validate or copy
Switch to Validate to check a pasted NISS, or copy the result and download it as a .txt file.
Use cases
Social security field fixtures
Seed Portuguese social security forms with a value that passes the weighted check instead of a real NISS.
Payroll form tests
Exercise payroll and benefits screens that require an 11-digit social security number.
Person vs company coverage
Generate both prefixes so your form handles individual and corporate contributors separately.
NISS layout and check
| Part | Rule |
|---|---|
| Length | 11 digits |
| First digit | 1 for a person, 2 for a company |
| Weights | 29, 23, 19, 17, 13, 11, 7, 5, 3, 2 over the first 10 digits |
| Check digit | 9 − (weighted sum mod 10) |
| Validation | Checks prefix, length and check digit |
Spaces are ignored during validation; letters are rejected as malformed.
Common mistakes
Mistake:Reusing the NIF check rule
Fix:NISS uses its own weights and a 9-minus-remainder rule, not the NIF mod-11 check.
Mistake:Assuming the first digit is random
Fix:1 marks a person and 2 marks a company, so the prefix changes the meaning.
Mistake:Expecting letters in a NISS
Fix:The value is all digits; spaces are ignored but letters are rejected.
Frequently asked questions
Are these real Portuguese NISS numbers?
No. They are synthetic values for QA and development and must not be used for real social security claims, tax filings, KYC checks, or identity documents; DevTools accepts no liability for their use.
How is a NISS different from a NIF?
A NISS is the eleven-digit social security number, while a NIF is the nine-digit tax number. They use different lengths, prefixes and check rules, and DevTools has a separate tool for each.
What do the first digits mean?
A NISS starting with 1 belongs to a person and one starting with 2 belongs to a company. The validator rejects any other leading digit before it checks the checksum.
Can a generated NISS match a real person or company?
It can. The weighted check only proves the number is well formed, so a random value may coincide with a real issued NISS. Use generated values in test environments only.
Is there a check digit in a NISS?
Yes. The eleventh digit is 9 minus the weighted sum of the first ten digits modulo 10, using the fixed weights 29, 23, 19, 17, 13, 11, 7, 5, 3 and 2.
References & standards
Related tools
Portugal NIF Generator
Generate synthetic 9-digit Portuguese NIF and NIPC tax numbers with mod-11 check digits, and validate pasted values for QA.
SEPA IBAN Generator
Generate SEPA-eligible IBAN and BIC pairs with ISO 7064 Mod 97-10 checks.
VAT Number Generator
Generate VAT numbers for EU, UK, Switzerland, Norway and global tax integration testing.
National Identity Generator
Generate and validate national ID numbers for testing (TR, US, DE, UK, SA, AE, QA, KW, CA, ES, BR, FR, IT, NL, SE, NO, EG, SG)
Tax ID Validator
Auto-detect and validate VAT, EIN, TIN and GST identifiers with batch checksum reporting.