PIS/PASEP Validator
Validate Brazilian PIS/PASEP numbers using the official check-digit algorithm. No data sent to servers. Free and no sign-up.
How does PIS/PASEP validation work?
A PIS/PASEP number is 11 digits long. The first 10 make up the base number and the last one acts as the check digit. To find it, each base digit is multiplied by the weights [3,2,9,8,7,6,5,4,3,2] and the total goes through modulo 11.
All of the checking happens right in your browser. Whatever you type here never goes to any server.
PIS / PASEP / NIT / NIS validation: the same modulo 11 algorithm
Brazilian payroll has four acronyms that point to the same 11-digit number: PIS (Programa de Integracao Social, for private-sector workers), PASEP (Programa de Formacao do Patrimonio do Servidor Publico, for public-sector workers), NIT (Numero de Identificacao do Trabalhador, used by the INSS for autonomous and freelance workers) and NIS (Numero de Identificacao Social, used by Caixa Economica Federal across social programs). All four share the same registry — Cadastro Nacional do Trabalhador — and the same check-digit algorithm. The label changes with the context, not the number.
A PIS-family number has 11 digits. The first 10 carry the registration sequence, and the 11th is the check digit (DV) computed via modulo 11 with weights 3, 2, 9, 8, 7, 6, 5, 4, 3, 2.
Check-digit calculation
- Multiply each of the first 10 digits, in order, by the weights 3, 2, 9, 8, 7, 6, 5, 4, 3, 2.
- Sum the products.
- Compute the remainder of the sum modulo 11.
- If the remainder is less than 2, the DV is 0; otherwise the DV is 11 minus the remainder.
function pisDV(d) {
const w = [3,2,9,8,7,6,5,4,3,2];
const s = d.slice(0,10)
.reduce((acc, x, i) => acc + x * w[i], 0);
const r = s % 11;
return r < 2 ? 0 : 11 - r;
}
A robust validator must also reject sequences of a single repeating digit (00000000000, 11111111111, ...) because they pass the algebra but are explicitly blacklisted by Caixa and the INSS.
NIT vs PIS vs PASEP vs NIS: same number, different ownership
- PIS — emitted by Caixa, identifies CLT workers in the private sector for FGTS, abono salarial and seguro-desemprego.
- PASEP — emitted by Banco do Brasil, identifies federal, state and municipal civil servants.
- NIT — emitted by the INSS for self-employed workers and individual contributors. Same algorithm, different administrative path.
- NIS — the umbrella name used by CadUnico, Bolsa Familia, Auxilio Brasil and other welfare programs operated by Caixa.
Use in payroll software and the eSocial layout
Every Brazilian payroll platform — TOTVS Protheus / RM, ADP, ContaAzul, ContaSimples, Folha Certa, Sage, Senior, Domus — runs the PIS validation at two points: at employee onboarding and again at every eSocial event submission. The eSocial layout S-2200 (Cadastramento Inicial / Admissao) defines fields cpfTrab and nisTrab separately; if the NIS fails the check digit, the event is rejected with error XML/Schema before reaching the SEFIP/INSS pipelines.
In practice a cheap-fail client-side check saves hours of debugging downstream:
// Express middleware
app.post('/admissao', (req, res, next) => {
if (!validatePIS(req.body.nis))
return res.status(422).json({ error: 'NIS invalido' });
next();
});
Multiple PIS for the same worker: a frequent source of irregularity
A worker should have one PIS-family number for life. In the past, switching between private and public employment occasionally produced a parallel PASEP, leaving the same CPF tied to two different NITs. The Cadastro Nacional do Trabalhador (CNT) was created in 2018 to unify those records; the eSocial cross-checks CPF and NIT and flags multiplicidade, which blocks new admissions until the duplicates are merged at the INSS counter.
When validating older databases, do not be surprised by 12-digit PIS values — those were temporary INSS contributor numbers from the 1990s and must be re-registered to fit the modern 11-digit format.
Integration with Caixa Conectividade Social and government APIs
For batch validation against the live registry, the canonical channel is Conectividade Social ICP (Caixa Economica), a SOAP gateway that requires an A1/A3 ICP-Brasil certificate. Payloads carry CPF, NIS and FGTS data and follow the SEFIP layout. The INSS does not expose a free public CNIS API; consultations go through the Meu INSS citizen portal or the GOV.BR app via the worker's own credentials.
For automated test environments, the eSocial sandbox (homologation) accepts mock NIS values that pass modulo 11 but are clearly outside the production range — useful for CI pipelines that should never touch real worker data.
Frontend UX best practices
- Input mask
000.00000.00-0via IMask.js, vanilla regex or react-input-mask. - Pre-validate with regex
/^\d{11}$/after stripping punctuation. - Run the modulo 11 check on
blur— never on every keystroke. - Display a clear inline error tied to the field, not a global toast. Localize to PT-BR for Brazilian audiences.
- Never store the NIS alongside an FGTS account number in plaintext logs — the combination is sensitive payroll data.
FAQ
What is the difference between PIS and NIS?
There is no numeric difference. PIS is the label Caixa uses for the private-sector worker; NIS is the same number when used by social programs. Both follow the same modulo 11 algorithm.
Is eSocial validation of NIT mandatory?
Yes. Since 2019 the eSocial schema rejects events with a malformed NIT/NIS, and HR teams must regularize multiplicidade before the next admission event.
Where can a worker check their PIS for free?
On the Meu INSS mobile app (gov.br login), the Carteira de Trabalho Digital app, or directly at any Caixa branch with photo ID.
Does this validator store the number I type?
No. The check runs entirely in your browser; no HTTP request is sent and nothing is logged on the server.
Can the same number be both PIS and PASEP?
Yes, by design. The Cadastro Nacional do Trabalhador deliberately unifies the spaces so that an employee moving from CLT to civil service keeps the same identifier.
Related Tools
CPF Validator
Validate Brazilian CPF numbers instantly using the official algorithm. Useful for testing document validation in applications. No data sent to servers.
Batch CPF Validator
Validate a list of CPFs (one per line) and see which are valid and which are not. No data sent to servers.
Batch CNPJ Validator
Validate a list of CNPJs (one per line) with a summary of valid, invalid and total. No data sent to servers.
PIS/PASEP number validator
In the PIS/PASEP, the last digit comes from the ones before it. Checking that calculation catches typos before they cause trouble in a payroll run or a registration. The validator reruns the official math and tells you right away whether the number adds up.
Use it to clean up an employee base, double-check an admission form or review a spreadsheet before a labour import. Rather than finding the problem only when the system complains, you verify the number first and move on.
The check runs entirely in the browser, with nothing sent to any server. Since what you type never leaves your device, you can safely verify real numbers.