Skip to content
Anexet
Abstract illustration for “Credit Card Number”

Credit Card Number

A credit card number, or primary account number (PAN), is the digit string that identifies a card, its network and its issuer, ended by a Luhn check digit and treated as sensitive data under PCI DSS.

Anexet Team
November 12, 2026Read 5 min

What a card number carries

A credit card number is the public face of a payment card: the primary account number (PAN) printed on the front. Under ISO/IEC 7812 it runs to 19 digits at most. The opening digits identify the card network and the institution that issued the card, a block called the issuer identification number and once known as the BIN, while the final digit is a check digit computed with the Luhn algorithm.

The number is sensitive on its own, with no card present. Whoever holds a valid PAN can attempt charges at merchants that ask for nothing more, which is why payment fraud so often starts with a number rather than with the plastic. That is also why a PAN counts as sensitive data wherever it appears, from a checkout form to an old spreadsheet.

How the Luhn algorithm works

The Luhn algorithm, named after Hans Peter Luhn, who developed it at IBM, is a checksum: a quick arithmetic test on the digits themselves. Every major payment network uses it, and any string that claims to be a card number can be tested in a few passes.

The test was designed against human error, not against attackers: it catches single-digit typos and most swaps of adjacent digits, the mistakes a clerk or a customer actually makes. A number that passes is self-consistent, not necessarily issued, and about one random string in ten passes by chance, which is why the check is only the first filter.

  1. 1

    Start from the right

    Number the digits from right to left, with the check digit in position one.

  2. 2

    Double every second digit

    Take the digits in the even positions, the second, fourth and so on counting from the right, and double each.

  3. 3

    Fold the products

    If a doubling produced a two-digit result, subtract 9, which amounts to adding its two digits together.

  4. 4

    Add everything up

    Sum the doubled digits and the digits left untouched into one total.

  5. 5

    Check the remainder

    If the total divides by 10 with no remainder, the number passes the check.

Masking, truncation, tokenization

Protection starts with keeping as little of the number as the task allows. PCI DSS expects the PAN to be masked whenever it is displayed to a person, and the same idea extends into storage in several forms that look similar and do different things.

Masking protects the glance, not the record: a field shown as dots can still hold the full number underneath, so masked display never replaces care about where the value itself is kept. That distinction is the core of data masking as a practice.

MethodWhat it does
MaskingHides part of the number on screen, for example showing only the last digits
TruncationRemoves a segment of the number from the stored value itself
TokenizationReplaces the number with a surrogate that is useless outside the token system
EncryptionTransforms the stored value, readable again only with the key

What it looks like in Anexet

In Anexet DLP, a card number is a dedicated condition, not a pattern to guess. The Text condition in a blocking rule offers Bank card number alongside words, email and regular expressions, and the same condition exists in search and investigation of captured data for retrospective hunts across intercepted traffic. In both places a candidate number is additionally validated with the Luhn algorithm and checked against payment system databases, so order numbers and phone numbers do not masquerade as cards.

Choosing Bank card number as a blocking condition: the rule then validates each candidate number with the Luhn algorithm.

1 / 2

Where the check runs

Detection matters only when something happens next, and Anexet attaches the card condition to three different moments: the search that looks back, the policy that raises an incident, and the rule that stops a transfer outright. Data transfer blocking covers eleven channel types, from web forms and mail to messengers, clipboard, printing and removable drives.

LayerWhat it doesWhat happens on a match
Complex SearchRuns the Bank card number condition over intercepted dataReturns the documents and messages where a valid number appears
Security policiesCheck traffic automatically against the assigned rulesRaise an incident and notify the responsible officer
Blocking rulesInspect each transfer as it happensStop the transmission and record the event

Why card data still leaks

Card numbers rarely leave through a hacker's front door. They travel through routines nobody marks as risky, and each routine becomes a data leak in miniature:

A rule that only matches sixteen digits drowns the review in order numbers; without the Luhn check and payment system verification, real hits hide in the noise.

  • A full number pasted into a chat with a support agent who asked for a screenshot
  • A refund spreadsheet sent to a contractor with the PAN column still in place
  • An old export from a payment tool left on a shared drive
  • A receipt printed and left in the tray of a shared printer

Where to start

PCI DSS, the payment card industry standard, applies to any organization that stores, processes or transmits cardholder data. Among its expectations are masked display and protected storage of account data, and keeping numbers out of channels where they have no business is the job of data loss prevention. A tool such as Anexet helps meet these requirements; the obligation itself stays with the organization.

A practical start is to find out where numbers already live. Run the Bank card number condition over stored traffic, decide which hits were legitimate, then turn on monitoring and, for payment data in retail and elsewhere, blocking where a number should not travel.

Most card numbers leak through ordinary work, one paste and one attachment at a time; the check that catches them belongs in the channel, not in an audit a month later.

Anexet Team

How Anexet handles this

Anexet treats the card number as a first-class condition rather than a text pattern to guess. The same Bank card number check, validated with the Luhn algorithm and verified against payment system databases, runs in Complex Search, in security policies and in blocking rules across eleven channel types.

Deployment is on-premise, so intercepted traffic and the card numbers inside it stay in the organization's own infrastructure.

  • Detection

    Bank card number as a dedicated condition in Complex Search and in the Text condition of blocking rules.

  • Predefined rules

    Security Policies ship with predefined rules for card data, and any of them can be duplicated into an editable custom rule.

  • Blocking

    Transfers that contain a card number can be blocked on web forms, mail, messengers, clipboard, printing and removable drives.

  • Notifications

    Incidents reach the responsible officer by email, Telegram or Syslog, with the risk level set per rule.

Anexet DLP

Learn more

Frequently Asked Questions

Common questions about this term and how Anexet handles it.

No. The check only confirms that the digits are internally consistent, and about one random string in ten passes by chance. Pairing the check with issuer verification, as Anexet does against payment system databases, is what separates real cards from lookalikes.

A pattern matches the shape of a number, and many values share that shape: order numbers, tracking codes, phone numbers. Anexet carries card numbers as a separate Bank card number condition precisely so the Luhn check and payment system databases filter the noise.

Yes. The standard expects the primary account number to be masked whenever it is displayed and to be protected wherever it is stored or transmitted. Masking limits exposure on screen; storage and channel controls cover the rest.

It helps the organization meet requirements such as PCI DSS: the Bank card number condition runs in search and in blocking rules with Luhn and payment system verification, predefined security rules watch for card leaks, and incidents reach the responsible officer by email, Telegram or Syslog.

Protect your data with Anexet

See how Anexet stops data leaks, monitors employee activity, and keeps you compliant, in a quick live demo.

Request a demo