JavaScript Luhn-algorithm Source Code

JavaScript implementation of the Luhn algorithm, with calculation and validation functions. The Luhn algorithm, a simple checksum verification algorithm, is also known as Luhn formula, modulus 10 algorithm, or mod 10 algorithm. It is most notably used to validate credit card numbers and IMEI phone identification numbers.

This source code is in the public domain. You may use, share, modify it freely, without any conditions or restrictions.

Download source code:

See it in action, try it online now:

See also JavaScript source code for base64, CRC-32.

Source Code


Calculation and conversion tools:

Text Conversions
Unit Conversions
international and imperial
size, perimeter, area, volume...