Tarayıcınız güncel değil

Bu siteyi görüntülemek için tarayıcınızın veya cihazınızın işletim sisteminin güncellenmesi gerekiyor.

Your browser is out of date. Please update iOS or your browser to view this site.

Skip to main content
Gizke.com
Blog

CPF & CNPJ validator

Validate CPF or CNPJ check digits on your device — including alphanumeric CNPJ. No generator; nothing is sent to Receita.

Choose CPF or CNPJ and paste a number to check the digits.

This only checks the mathematical check digits. It does not prove the number is registered at Receita Federal.

Runs on your device. Nothing is sent.

A Brazilian CPF is an 11-digit taxpayer id whose last two digits are check digits from the first nine. A CNPJ identifies companies: the classic form is 14 digits, and Receita is rolling out alphanumeric bodies (letters in the first twelve characters) while keeping two numeric check digits — treat mid-2026 timing as an estimate until the official notice for your case. This page only recomputes those digits in your browser. It never generates ids and never queries Receita.

Frequently asked questions

What is a CPF?
Brazil’s personal taxpayer / identity number. It has 11 digits: a 9-digit stem plus 2 check digits.
What is a CNPJ?
The registration number for companies and organisations. The classic form has 14 characters (body + 2 check digits).
Does this tool generate numbers?
No. It only validates. There is no “generate CPF/CNPJ” action.
Do you check whether it is registered at Receita?
No. Only the check-digit math runs here — no existence or cadastral query.
Is my number uploaded?
No. It never leaves your device (see the privacy note on this page).
How are CPF check digits calculated?
Weights 10→2 on the first 9 digits, then 11→2 including the first check digit; take (sum × 10) mod 11, and treat 10 as 0.
Are repeated digits (111…) valid?
No. Well-known all-same patterns are rejected.
How do CNPJ check digits work?
Weight sequences 5…2+9…2 then 6…2+9…2 with mod-11 rounding per Receita’s rule, locked by fixtures.
What is an alphanumeric CNPJ?
A form where the body may mix letters and digits while the two check digits stay numeric. Treat 2026 roll-out dates as an estimate until the official notice for your systems.
How are letters turned into numbers?
Letters are converted with Receita’s published letter-to-number rule so the same weights work for digits and letters. We do not invent a home-grown alphabet index.
Why highlight alphanumeric CNPJ?
Older validators expect digits only; the new form breaks them. This tool checks both.
Is the mask (dots, slash) required?
No. Paste with or without a mask; the result shows the grouped form.
What if I paste a CNPJ while CPF is selected?
You get a clear type mismatch message. There is no auto-fix or generation.
Will you fix a wrong check digit?
No. We mark it invalid (neutral grey) and give a short reason.
Can I validate a list / CSV?
Not in v1 — single number only. Bulk validation may come later.
How should accounting / ERP systems adapt?
Update length and character-class checks plus DV math; drop “digits only” assumptions. This is guidance, not legal advice.
Do you fill sample numbers?
No random generation. Synthetic fixtures are fine for docs and tests only.
Ads or data selling?
Ad slots are untouched by this feature; numbers are not stored.

Share this tool

BlogAboutContactTerms of UsePrivacy Policy