CC Checker

Validate your card number in one click

Input your credit card number on the right and click on the button to get started!

What algorithm is used to validate credit card number?

To validate a credit card number, the most widely used algorithm is the Luhn algorithm.

What is Luhn algorithm?

The Luhn algorithm is like a quick check to make sure a number (like a credit card number) is typed in correctly. Here’s how it works in three easy steps, using a pretend credit card number as an example:

Example Credit Card Number: 1234 5678 9123 4560

Double Every Other Number:

Start from the second-to-last digit, moving left, and double every other number. Our example becomes: 1-4-3-10-5-14-9-4-1-6-3-10-4-10-6-0 Add Digits Together:

If doubling a number makes it two digits, add those digits together to get a single number (e.g., 10 becomes 1+0 = 1). Then, add all these numbers up. For our example: 1+4+3+1+5+5+9+4+1+6+3+1+4+1+6+0 = 44 Check If Total Is Divisible by 10:

If the total sum is a multiple of 10 (like 30, 40, 50), the number passes the check. It's a quick way to spot mistakes. Our example's total is 44, which is not divisible by 10, so this would indicate a problem or typo in the number we used. Remember: This is just a made-up example to show how the steps work. Real credit card numbers are set up to pass this test, helping to catch simple mistakes like typing errors.