How do you detect Credit card type based on card number

By: Prem Tiwari | Last Updated: | In: Freebies, Javascript & Ajax

Hi Friend, I got some tutorial request from my regular blog readers. The question is “How do you detect Credit card type based on card number?”. I have done some R&D and finally got the Javascript code which detects the credit card type based on the credit card number.

Below is the simple and easy JavaScript code to detect credit card type when you type any credit card. Copy the below and use it in your web application.

You can use it with PHP,, and Java web technologies. copy paste below code in your page before head tag close.

For the display the ooutput use below html code.

Then output will be:

About: Prem Tiwari

Prem Tiwari is the founder of and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

You may also like:

, , ,