CFOP Validator
Validate a Brazilian CFOP code (fiscal operations code) by checking its 4 digits and prefix. Essential for issuing correct invoices (notas fiscais) in Brazil.
—
What the four CFOP digits actually mean
You are putting together a Brazilian invoice and the accountant sent a four digit code over chat: 5.102. Before typing it into the issuing software, you want to be sure it makes sense. Is it an inbound or an outbound operation? Does it cover a sale inside the state or across state lines? Getting the first digit wrong is the kind of mistake SEFAZ rejects on the spot, or worse, lets through and turns into an ICMS headache months later.
The check strips dots and dashes, then looks at the leading digit, which carries the nature of the operation: 1, 2 and 3 are inbound (same state, another state, abroad) and 5, 6 and 7 are the matching outbound codes. Notice that no CFOP starts with 4, 8 or 9, so typing 4102 returns an unrecognized prefix message. The first two digits are displayed apart from the last two purely to make the code easier to read.
The part that matters: this checks the shape of the code, not whether it exists. Something like 5000 passes as valid because it has four digits and an accepted prefix, even though the official table has no such entry. Use it to catch typos and inbound versus outbound mixups, then confirm the exact meaning (5102 is a resale of goods bought from third parties) in the official CFOP table or with your accountant. Everything runs in your browser.
Frequently asked questions
What does the first CFOP digit mean?
Does it show what the operation is?
Can I type the code with a dot, like 5.102?
Related Tools
ISBN-10 Validator
Validate a book ISBN-10 by computing the mod-11 check digit per the ISO 2108 standard. Useful for libraries, bookstores and older publishing catalogs.
Italian IBAN Validator
Validate an Italian IBAN (IT) by checking the 27-character length and the mod-97 check digit. Verify the bank account before sending money abroad.
ITF-14 Validator
Validate an ITF-14 barcode (used on cartons and shipping packaging) by checking the GS1 check digit. Useful for logistics and inventory control.
ISMN Validator
Validate an ISMN (International Standard Music Number), the code for sheet music and printed music, by its check digit. Useful for publishers and music libraries.
French IBAN Validator
Validate a French IBAN (FR) by checking the 27-character length and the mod-97 check digit. Verify the bank account before sending money abroad.
IMEI Validator (Luhn)
Validate a phone IMEI (15 digits) using the Luhn algorithm. Check whether a device identification number is valid before buying or registering it.