Mexico RFC and CURP validator

Check the format, the date and the check digit of an RFC or a CURP before you create the customer or vendor in SAP Business One.

Tool

This tool checks the format and the check digit; it does not query the SAT register. To confirm that an RFC is registered and active, use the SAT’s official services at sat.gob.mx.

RFC · CURP
Using SAP Business One? The business partner’s RFC is stored in the LicTradNum field of the OCRD table.OCRD table →

How do you validate a Mexican RFC?

A valid RFC has 13 characters for an individual (persona física) and 12 for a company (persona moral). Check three things: that it starts with letters from the name or company name, that the next 6 digits are a real date (yymmdd), and that the last character matches the check digit calculated with modulo 11. This tool runs all three checks; only the SAT confirms an active registration.

RFC structure

TypeLengthPartsMade-up example
Individual (persona física)134 letters + birth date (yymmdd) + 3-character homoclaveMOPL 850315 AB9
Company (persona moral)123 letters + incorporation date (yymmdd) + 3-character homoclaveSOL 990601 K30

The SAT assigns the homoclave: the first two characters keep RFCs unique and the third is the check digit (0–9 or A).

How is the RFC check digit calculated?

  1. Take the first 12 characters. For a company (11 characters without the digit), add a space in front.
  2. Turn each character into a value: 0–9 = 0–9, A = 10 … N = 23, & = 24, O = 25 … Z = 36, space = 37, Ñ = 38.
  3. Multiply each value by its weight, from 13 on the first character down to 2 on the last, and add them up.
  4. Compute 11 − (sum mod 11). If the result is 11, the digit is 0; if it is 10, the digit is A.

Example (made up): MOPL850315AB. M=22×13 + O=25×12 + P=26×11 + L=21×10 + 8×9 + 5×8 + 0×7 + 3×6 + 1×5 + 5×4 + A=10×3 + B=11×2 = 1289. 1289 mod 11 = 2. 11 − 2 = 9, so the full RFC is MOPL850315AB9.

Some RFCs that the SAT issued and that are in use do not follow this calculation. When the format is right but the digit does not match, the tool tells you so without calling the RFC invalid: confirm it with the SAT before you correct the number.

Generic RFCs

XAXX010101000 is used for the general public when the customer gives no RFC, and XEXX010101000 for foreign customers without an RFC. Check the current SAT rules before you use them on a CFDI.

How do you validate a CURP?

A CURP has 18 characters: 4 letters from the name, the birth date (yymmdd), the sex (H or M), the code of the state of birth (for example JC for Jalisco or NE for born abroad), 3 inner consonants, a differentiator and a check digit. The digit is calculated over the first 17 characters with weights 18 down to 2 and (10 − sum mod 10) mod 10. The person’s details are looked up at gob.mx/curp.

Checking the format vs. checking with the SAT

This tool checks that the number is written correctly. An RFC with the right format may not exist, may be suspended, or may not belong to your customer. To confirm the registration, the name and the tax regime, use the SAT’s official services at sat.gob.mx.

The RFC in SAP Business One

In SAP Business One, a customer’s or vendor’s RFC is stored in the business partner’s tax ID field (LicTradNum in the OCRD table). Checking it when you create the partner avoids errors in reports and documents. If you want validation rules inside SAP B1, see our SAP Business One development service or SAP Business One by country.

Other LatAm validators

How it works

Three steps, no signup

1

Paste the RFC or CURP

With or without dashes or spaces: a 13-character RFC (individual), a 12-character RFC (company) or an 18-character CURP.

2

We check the structure

Letters, a real date (yymmdd), the homoclave and the check digit, using the RFC modulo 11 rule or the CURP rule.

3

Create the record cleanly

Use the checked number on the business partner in SAP Business One, and confirm the registration with the SAT.

FAQ

Questions about this tool

How do you validate a Mexican RFC?

Type the RFC into the tool, with or without dashes. It checks the length (13 characters for an individual, 12 for a company), that the date is real, the homoclave and the check digit with the modulo 11 calculation. To know whether the RFC is registered and active, use the official SAT portal.

How many characters does an RFC have?

An individual’s RFC (persona física) has 13 characters: 4 letters from the name, 6 digits of the birth date (yymmdd) and a 3-character homoclave. A company’s RFC (persona moral) has 12: 3 letters from the company name, 6 digits of the incorporation date and a 3-character homoclave.

How is the RFC check digit calculated?

Take the first 12 characters (a company RFC gets a space in front), turn each into a value (0–9 = 0–9, A = 10 … N = 23, & = 24, O = 25 … Z = 36, space = 37, Ñ = 38) and multiply by 13, 12, 11… down to 2. Add them up and compute 11 − (sum mod 11): 11 becomes 0 and 10 becomes A.

Why can a real RFC fail the check digit?

Some RFCs that the SAT issued and that are in use do not follow the published calculation. So when the format is right but the digit does not match, the tool does not call the RFC invalid: it asks you to confirm it with the SAT before you change the number.

What is the RFC XAXX010101000?

It is the generic RFC for sales to the general public, when the customer gives no RFC. For foreign customers without an RFC, XEXX010101000 is used. Check the current SAT rules before you use them on a CFDI.

Does this tool confirm that the RFC is active with the SAT?

No. It checks the format and the check digit offline. The taxpayer’s name, tax regime and status are confirmed only by the SAT, on its official portal.

How do you validate a CURP?

A CURP has 18 characters: 4 letters, the birth date (yymmdd), the sex, the state of birth, 3 consonants, a differentiator and a check digit. The tool checks the date, the state code and the check digit; the person’s details are looked up at gob.mx/curp.

Does the validator store my data?

No. The calculation runs in your browser and the RFC or CURP is not sent to Kodenova or to any server.

SAP Business One in Mexico

We build add-ons, reports and integrations for SAP B1 on SQL Server and HANA. Tell us what you need and get a fixed price per phase.