Knowledge Base

How to add CAPTCHA protection to your web site

This article describes what CAPTCHA protection is, when you might use it, and some implementations for various programming languages that you can add to your own web site.

What is a CAPTCHA?

A CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a test that tries to determine if a user is a human or a computer. The most common type of CAPTCHA is an image of obscured letters or numbers displayed in a box. A user must type the letter or number sequence correctly before he or she can access web site content or submit data. Because automated bots usually cannot read these images, they are prevented from misusing a web site's resources.

The following image is an example of a common type of CAPTCHA:

Example CAPTCHA image

When to use CAPTCHA protection

You should consider adding CAPTCHA protection to your web site if it has any of the following:

  • Forms that process user-submitted data, including e-mail forms, comment forms, and registration forms.
  • Surveys or polls.
  • Pages that accept file uploads or downloads by users.
  • Any other pages that accept user-submitted data.

CAPTCHA implementations

There are several free and open source CAPTCHA implementations available, depending on the programming language that your web site uses.


These are some of the numerous CAPTCHA implementations available for PHP:


The service listed above for PHP also has a Python implementation. For more information, please visit

More Information

For more information about CAPTCHAs, please visit