Mastercard card number
ID bankcard_mastercard
Pattern of bankcardPersonal data (PII)identifierDraft
This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).
Primary account number of a Mastercard card: 16 digits that start with 51 to 55 or, since 2017, with 2221 to 2720. The last digit is a Luhn check digit. The pattern accepts the number without spaces or hyphens.
- Pattern of
- Bank card (credit/debit card)
bankcard - Categories
- Personally identifiable information, Finances and banking
- Countries
- Global (not tied to a country)
- Languages
- Common to most languages
- Check digit
luhn- Quality
- 85/100 · missing: mapping (Wikidata, Schema.org, ...), translation
- Metacrafter rules
- no detection rule yet
- Supported by tools
- Cloudflare DLP, Datadog Sensitive Data Scanner, pyWhat, validator.js
Regular expression
^(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$
Python re syntax.
Examples
| Value | Description |
|---|---|
| 5555555555554444 | Stripe test card number |
| 2223003122003222 | Stripe test card number from the 2-series range |
| 4242424242424242 invalid | Visa test number |
Sources
Use this record
- Page URL:
https://registry.apicrafter.io/datatype/bankcard_mastercard - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/finances/bankcard_mastercard.yamlon GitHub