Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Automatic Captcha Verification using JavaScript

  • Last Updated : 01 Feb, 2019

Captcha: Captcha is a program used to protects websites through bots. It generates some tests that human can read and pass it but current computer can not do. For example, humans can read distorted text but computer can not read. The CAPTCHA is the abbreviation of Completely Automated Public Turing Test To Tell Computers and Humans Apart.

There are many paid software in market which detect captcha code. The Tessaract.js library is used to identifying numbers from the text.

Note: Its prediction is not 100% accurate however it can improve accuracy by using the str.replace(“”, “”) method. Only numeric captcha can be solved easily by using this method.



<!DOCTYPE html>
        Auto captcha verification
    <script src =
    <img id = "img" src = "" />
    <div id = "GFG"></div>
    <!-- script for auto captcha verification -->
        let progress = document.querySelector('#GFG');
        .progress(function(p) {
            progress.innerHTML += JSON.stringify(p) + "<br>"
        .then(function(result) {
            var captcha = result.text;


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!