ตัวตรวจสอบเลขบัตรการชําระเงิน: Luhn Check และ Network Finder

เล็บเลขบัตรหนึ่งหรือหลายตัว เพื่อทดสอบความยาว และหลักตรวจ Luhn และอ่านเครือข่ายบัตร

ทำงานในเบราว์เซอร์ของคุณ ไฟล์ไม่ออกจากอุปกรณ์ ดูวิธีตรวจสอบ

…

วิธีทำ

  1. 1
    เล็บเลข

    กรอกหรือติดตั้งเลขบัตรหนึ่งตัวต่อแถว

  2. 2
    เช็คดู

    เครื่องมือทดสอบความยาวและดัชนีลูห์น

  3. 3
    อ่านคําตัดสิน

    ตัวเลขแต่ละตัวมีเครื่องหมายผ่านหรือล้มเหลว

  4. 4
    ดูเครือข่าย

    เลขที่ใช้ได้แสดงเครือข่ายการ์ด

  5. 5
    ใช้เลขการทดสอบ

    การทดสอบด้วยตัวอย่างจํานวนเท่านั้น

เกี่ยวกับเครื่องมือนี้

Payment card numbers have 13 to 19 digits. The last digit is a check digit calculated with the Luhn formula, so that most typing mistakes can be found without asking the bank. The first digits show the network: 62 for UnionPay, 4 for Visa, 51 to 55 and 2221 to 2720 for Mastercard, 34 and 37 for American Express and 3528 to 3589 for JCB. This tool tests the Luhn digit and the length, names the network and splits the number into groups. Use only test numbers.

Who this is for

Developers and testers who build payment forms, shop owners who want to catch typing mistakes, and students who study how card numbers work.

The structure of a card number

The first digit is the major industry identifier. The first six digits form the issuer identification number, which identifies the bank and the network. The digits that follow are the account number, and the last digit is the check digit. UnionPay cards usually have 16 to 19 digits and start with 62. Visa cards start with 4. Mastercard numbers start with 51 to 55 or, in the newer range, with 2221 to 2720. American Express numbers start with 34 or 37 and have 15 digits. JCB numbers start with 3528 to 3589.

The Luhn formula

Start from the rightmost digit, the check digit, and move left. Double every second digit, counting from the second from the right. If a doubled digit is greater than 9, subtract 9. Add all digits. If the total is a multiple of 10, the number passes. The formula finds any single wrong digit and almost all swaps of neighbouring digits. It is not security: anyone can create a number that passes the test, so passing does not mean a card exists.

Using the tool

Paste one number per line. Spaces and hyphens are removed. The tool checks that all characters are digits, that the length is from 13 to 19 and that the Luhn test passes. A valid number is shown in groups of four with the network, the length, the first six digits and the first digit. Failed lines give the reason.

A worked example

6200000000000005 passes and is a UnionPay test number. 4111 1111 1111 1111 passes and is a Visa test number. 5555 5555 5555 4444 passes and is a Mastercard test number. 3782 822463 10005 passes and is an American Express test number. 6200000000000006 fails because the last digit is wrong. 1234 fails because it is too short.

Safety

Never enter a real card number into a tool you do not trust, and never share a card number, expiry date and security code in a message. Use well-known test numbers for development. This tool runs in your browser, so nothing is sent or stored, but it is still a good habit to test with made-up or test numbers.

Limits

A passing number may not be a real card. The tool does not contact any bank. It is a technical check and not financial advice.

ตัวอย่างพร้อมวิธีทำ

6200000000000005 passes the Luhn test and is recognised as a UnionPay test number, while 6200000000000006 fails.

สรุปสั้น ๆ

คำถามที่พบบ่อย

สูตรลูห์นคืออะไร?

เช็คที่เพิ่มเป็นสองครั้งทุกหลัก และต้องการให้ยอดรวมเป็นคูณของ 10

เครื่องมือรู้เครือข่ายได้ยังไง?

จากหลักแรกของตัวเลข

การผ่านหมายถึงการ์ดเป็นของจริงเหรอ

ไม่ครับ การทดสอบพบแต่ความผิดทางการพิมพ์

บัตรมีจํานวนกี่หลัก

จาก 13 ถึง 19 หลัก

ฉันใช้เบอร์จริงได้ไหม

ใช้เลขทดสอบ อย่าใส่รายละเอียดบัตรจริงในเครื่องมือที่คุณไม่ควบคุม

ข้อมูลของฉันถูกเก็บไว้หรือเปล่า?

ไม่ เช็คจะทํางานในบราว์เซอร์ของคุณ

ฟรีทั้งหมดไม่มีค่าใช้จ่าย ไม่ต้องสมัคร
ไฟล์เป็นส่วนตัวทุกอย่างทำงานในเบราว์เซอร์ของคุณ
ใช้ง่ายในภาษาของคุณมีหลายภาษา