Create Fast, Simple and User-Friendly Captcha in jQuery & PHP – IconCaptcha

If you are facing lot’s of spamming traffic on your website then you must apply Captcha which detect the traffic is organic or robots it also prevent form annoying boats from eating your bandwidth. That’s why in this post I am going to share simple jquery and PHP based Captcha plugin . IconCaptcha is a faster and more user-friendly captcha than most other captchas. You no longer have to read any annoying text-images, with IconCaptcha you only have to compare two images and select the image which is only present once.Besides being user-friendly, IconCaptcha is also developer-friendly. With just a few steps you can get the captcha up and running. Even developers new to JavaScript and PHP can easily install IconCaptcha. The demo page contains all the code needed to get the captcha working.


  • User Friendly: The captcha uses easily understandable images instead of hard to read texts to complete the captcha.
  • Server-side validation: Any validation done by the captcha will be performed on the server-side instead of the client-side.
  • Events: Events are triggered at various points in the code, allowing you to hook into them and execute custom code if necessary.
  • Themes: Select the design of the captcha without having to ever touch the stylesheet.
  • SASS: The project contains a SASS file, allowing you to easily style and compile the stylesheet.
  • Supports IE: The captcha supports Internet Explorer 8 and up.


Include jQuery library and after that add Icon Captcha Plugin’s libraries on page.

<link href="style.css" rel="stylesheet">
<script src="//"></script>
<script src="script.min.js"></script>


Now simply integrate icon captcha placeholder to your HTML form.

<form action="" method="post">
    <!-- The captcha will be generated in this element -->
    <div class="captcha-holder"></div>


Call the function to generate an icon captcha inside the form element.

$(function() { 


Add following php code to apply server side validation.

    // IconCaptcha::setErrorMessages(array('', '', '', ''));
    if(!empty($_POST)) {
        if(IconCaptcha::validateSubmission($_POST)) {
            echo 'The form has been submitted!';
        } else {
            echo IconCaptcha::getErrorMessage();

See live demo and download source code.


Visit official github repository for more information and follow for future updates. Don’t forget to read license for using this plugin in your projects.