A personal identification number (PIN) is a short secret code, usually four to six digits, that a person enters to prove they are the rightful user of a payment card, a bank account or a device. It is most familiar at the automated teller machine (ATM) and at shop terminals, where typing the PIN confirms that the person holding the card is its owner.
In security terms a PIN is a "knowledge factor": something only the user should know. It is usually paired with a "possession factor", the physical card or phone, which makes card-and-PIN an early everyday example of two-factor checking. The rules for creating, transmitting and storing PINs in banking are set by the international standard ISO 9564 and by the payment card industry's PIN security requirements.
PINs in plain terms
A PIN works like the combination on a padlock that you carry on a key ring. The lock (your card) is useful to anyone who finds it only if they also know the combination. Because the number is short, it is easy to remember, and the system makes up for its shortness by locking you out after a few wrong guesses.
The clever part is that the shop or cash machine never learns your number in readable form. The keypad scrambles it the moment you type it, and only a sealed, tamper-proof box at the bank, or the chip on your card, can check whether it is right.
History
The idea of pairing a card with a secret number goes back to the first cash machines in the 1960s. Scottish engineer James Goodfellow filed a British patent in 1966 for a system that combined a coded card with a personal number, and Barclays opened one of the earliest cash dispensers in Enfield, north London, in June 1967. As debit cards spread in the 1980s, national PIN-based debit networks grew around them, especially in the United States and Europe.
The bigger change came with chip cards. The EMV specification, now managed by EMVCo, let the card's chip itself check the PIN. The UK made "chip and PIN" the norm at shop tills in 2006, replacing the signature on most face-to-face card payments.
How PIN verification works
A PIN can be checked in two main ways, and the choice is one of the cardholder verification methods the terminal and card agree on during a card present (CP) transaction:
- Online PIN. The terminal encrypts the PIN into a protected data block and sends it with the authorisation request. It travels through the acquirer and the card networks to the card issuer, whose hardware security module compares it with the stored reference value. ATM withdrawals and most US debit transactions use this method.
- Offline PIN. The terminal passes the PIN to the card's chip, which checks it against a value stored inside the chip and reports the result. This is common for credit cards and debit cards in Europe.
Either way, the check is one step in the wider authorization and settlement flow, and a wrong PIN produces a decline before any money moves.
Security rules and protections
Because the PIN is the main secret, the industry protects it at every stage. Terminals must use certified PIN entry devices that encrypt the digits inside the keypad. Issuers generate and store PIN reference values only in hardware security modules, never in ordinary databases, and the payment card industry's PIN security requirements govern how keys are managed. After a set number of wrong attempts, often three, the card is blocked, which makes guessing a four-digit code impractical even though there are only 10,000 combinations.
In online banking, PINs often form one layer of multi-factor authentication (MFA) and help meet the PSD2 (Second Payment Services Directive) requirement for strong customer authentication (SCA). Phones increasingly replace the typed PIN with fingerprints or face scans, a form of biometric data, though a device passcode usually remains as the fallback.
Limitations and alternatives
PINs have well-known weaknesses. People choose predictable numbers such as birth years or repeated digits, and criminals capture PINs with skimming devices, hidden cameras or "shoulder surfing" at tills. A PIN also cannot be used in a card not present (CNP) purchase on a website in the same way, so online payments rely instead on the card verification value (CVV), one-time passwords (OTP) and app-based approval.
Speed matters too. Many low-value contactless payments skip the PIN altogether, and some US debit transactions are deliberately processed as PIN-less payments over PIN networks, a choice shaped by US debit routing rules. Those exemptions trade a little security for convenience, with card issuers covering more of the fraud risk in return.