Skip to content

Country pack

Mexico PII detection: NSS, RFC

Updated 6 detectorsPack code mx

Short answer

Maskflare's Mexico pack has 6 detectors. 3 validate a check digit or letter, 2 test layout or an embedded date, 1 matches on pattern alone.

What the Mexico pack covers

The Mexico pack holds 6 detectors: Bank account (CLABE), CURP, Social security number (NSS), Phone number, Postal code and Tax ID (RFC). 3 of them recompute a check digit or letter, 2 test layout or an embedded date only, 1 is pattern-only, and 2 wait for a keyword before they match.

Examples are synthetic and were run through Maskflare's validators. Click a detector name for its own page where one exists.
DetectorCategoryValidationValid example
Bank account (CLABE)bank account number (IBAN)Checksum032180000118359719
CURPnational ID numberChecksumHEGG560427MVZRRL04
Social security number (NSS)social security numberChecksum12345678903
Phone numberphone numberLayout rules+52 1 55 1234 5678
Postal codepostal codePattern only06600
Tax ID (RFC)tax IDLayout rulesGODE561231GR8

Every Mexico detector in detail

Bank account (CLABE)

A bank account identifier. Validation: 18 digits with a weighted modulus 10 check digit. A run of digits with no separator is judged by words nearby; the detector's own keywords include account, clabe, cuenta, spei. Valid example: 032180000118359719; the same shape that fails is 032180000118359710.

CURP

A national identity number. Validation: an embedded birth date and a weighted check digit. Valid example: HEGG560427MVZRRL04; the same shape that fails is HEGG560427MVZRRL00.

Social security number (NSS)

A social security or social insurance number. Validation: 11 digits that pass the Luhn check. It needs one of 7 keywords within 48 characters before the value, such as imss, insurance number, nss, seguro social. Valid example: 12345678903; the same shape that fails is 12345678900.

Phone number

A telephone number in the national format. Validation: between 7 and 15 digits, the range an international number can have. Valid example: +52 1 55 1234 5678.

Postal code

A postal code, which identifies a place rather than a person on its own. Validation: the pattern only, with no checksum or structural validator. It needs one of 9 keywords within 48 characters before the value, such as c.p., codigo postal, código postal, post code. Valid example: 06600.

Tax ID (RFC)

A tax identifier. Validation: the birth date embedded in the code; the homoclave characters are not checked. Valid example: GODE561231GR8; the same shape that fails is GODE561232GR8.

Local-language context words for Mexico

These are the words in the catalogue that confirm a value as belonging to this country's detector. Shared English words such as ID number or tax id are left out here because many packs use them; a word below points at this pack even when other packs are on.

  • Bank account (CLABE): account, clabe, cuenta, spei, transferencia
  • Social security number (NSS): imss, nss, seguro social
  • Postal code: c.p., codigo postal, código postal

How Maskflare masks Mexico identifiers

Detections are replaced with a token such as mf_mask_d7e0 before the request goes to the AI provider, and with response restoration turned on the real value is put back in the answer. The other actions are redact, partial, hash, format-preserving encryption, generalize, alert and block.

  • Protect now, Finance - Protect now, Healthcare and Developer: mask (a reversible token) when Mexico is a primary country.
  • Monitor first: alert (counted, forwarded unchanged) when Mexico is a primary country.

None of the compliance profiles (HIPAA Safe Harbor, GDPR (EU/EEA), UK GDPR, PCI DSS v4.0, US PII (CCPA/CPRA) and Swiss nDSG health data) includes the Mexico pack. Its detectors run when Mexico is chosen as a primary country or the pack is enabled directly.

Limits worth knowing

  • A passing checksum shows that a value is well formed, not that it was issued to a real person. The examples on this page pass for that reason and are not real.
  • 1 of the 6 detectors here matches on pattern alone (Postal code), so it can match text that merely has the same shape.
  • Detectors read the text of the request. A value inside an image is found only after OCR, and a value split across lines is not one match.
  • Names, addresses and free-text details are handled by other packs. This page is limited to the Mexico identifiers.

Frequently asked questions

What does Maskflare detect for Mexico?

6 detectors: Bank account (CLABE), CURP, Social security number (NSS), Phone number, Postal code and Tax ID (RFC).

Are Mexico identifiers masked by default?

They are masked when Mexico is chosen as a primary country (the default Protect now template uses the action mask), or when the pack is turned on directly. A country pack is not on for organisations that did not choose the country.

Which Mexico identifiers have a checksum?

Bank account (CLABE), CURP and Social security number (NSS).

Do the Mexico detectors need keywords?

2 of them do: Social security number (NSS) and Postal code.

Rules on this page describe what Maskflare's detectors and validators check. They are read from the detection catalogue and are not the specification of the body that issues the identifier. Examples are synthetic.

Related pages

See it on your own data

Try Maskflare free.
Bring your hardest prompts.

28-day free trial or 10,000 requests, whichever comes first. Point one app at the gateway or enroll a few laptops,
and watch what gets masked. Or talk to us first.