Step-by-step Luhn algorithm validation
Card number:
Card number:
Reset Start Next step Complete
Step 1: Extract digits and identify positions
Starting from the right, every second digit (excluding check digit) will be doubled.
Step 2: Double every second digit
Multiply alternate digits by 2, starting from the second-to-last digit.
Step 3: Handle two-digit results
If doubling produces a two-digit number, subtract 9 (or add the digits).
Step 4: Sum all digits
Add all the processed digits together.
Step 5: Check validity
If the sum is divisible by 10, the number is valid.
0