Skip to content

Individual Taxpayer Identification Numbers (ITIN)

Filter

This filter identifies values in the form of US Individual Taxpayer Identification Numbers (ITIN) and reports them with the span type itin. An ITIN has the same format as an SSN but always begins with 9, such as 912-70-1234, 912 70 1234, or 912701234.

The SSN filter never reports a value beginning with 9, so with both filters enabled an ITIN is reported only as itin and an SSN only as ssn.

Adoption Taxpayer Identification Numbers (ATIN), which have the form 9NN-93-NNNN, are reported as itin unless onlyValidRanges is true.

Detection is based on the format of the value, so a nine-digit number beginning with 9 that is not an ITIN can be reported. Setting onlyValidRanges reduces this. Validate the results against your own documents.

Separators and line breaks

Between digit groups the filter accepts a hyphen, a single space or other horizontal whitespace character, or nothing at all. In place of the ASCII hyphen it also accepts the soft hyphen (U+00AD), the dashes U+2010 through U+2015, the minus sign (U+2212), and the small and fullwidth hyphen-minus forms (U+FE58, U+FE63, U+FF0D). A value wrapped across a line break is detected when the break follows a hyphen, such as 912- at the end of one line followed by 70-1234 on the next. A match does not begin or end partway through a longer run of digits or letters.

Not detected: digits split across lines with no hyphen before the break, a break inside a digit group, digits outside ASCII (such as fullwidth digits), and more than one whitespace character between groups.

Required Parameters

This filter has no required parameters.

Optional Parameters

Parameter Description Default Value
itinFilterStrategies A list of filter strategies. None
onlyValidRanges When true, only report ITINs whose fourth and fifth digits fall in the ranges the IRS issues: 50 to 65, 70 to 88, 90 to 92, and 94 to 99 (IRS Publication 4757). This reduces false positives, but drops ATINs (93) and any range the IRS issues after this release of Philter. false
enabled When set to false, the filter will be disabled and not applied true
ignored A list of terms to be ignored by the filter. None

Filter Strategies

The filter may have zero or more filter strategies. When no filter strategy is given the default strategy of REDACT is used. When multiple filter strategies are given, they are evaluated in the order listed and only the first one whose condition is satisfied, or that has no condition, is applied. See Filter Strategies for details.

Strategy Description
REDACT Replace the sensitive text with a placeholder.
MASK Replace each character of the sensitive text with a mask character (* by default).
TRUNCATE Replace all but a few characters of the sensitive text with a truncation character (* by default).
RANDOM_REPLACE Replace the sensitive text with a similar, random value.
STATIC_REPLACE Replace the sensitive text with a given value.
CRYPTO_REPLACE Replace the sensitive text with its encrypted value.
HASH_SHA256_REPLACE Replace the sensitive text with its SHA256 hash value.
FPE_ENCRYPT_REPLACE Replace the sensitive text with a value generated by format-preserving encryption (FPE)
LAST_4 Replace the sensitive text with just the last four characters of the text.

Conditions

Each filter strategy may have one condition. See Conditions for details.

Conditional Description Operators
TOKEN Compares the value of the sensitive text. ==, !=, startswith
CONTEXT Compares the filtering context. == , !=
CONFIDENCE Compares the confidence in the sensitive text against a threshold value. < , <=, > , >=, ==, !=

Example Policy

{
   "identifiers": {
      "itin": {
         "onlyValidRanges": true,
         "itinFilterStrategies": [
            {
               "strategy": "LAST_4"
            }
         ]
      }
   }
}