You are here: Blog » Code Snippets » Implement Google reCAPTCHA v3

Implement Google reCAPTCHA v3


A while back I posted a snippet on how to implement a Google reCAPTCHA v2 Checkbox. In this post, I am going to demo how to implement the Google reCAPTCHA v3, which doesn’t require any extra input from the user in order to prove they are human. The code below shows two ways to implement the reCAPTCHA v3.

The Code (Easy Way)

This way is easier and it works by binding the challenge to your button.


The Code (Harder Way)

This way works by binding the challenge programmatically. Though slightly more difficult, it can be better to use this method, because you have more control of the logic in terms of when to run the reCAPTCHA check. In the example below, we run a basic validation check to make sure the name field isn’t empty before sending to reCAPTCHA


This entry was posted in Code Snippets and tagged , by .

Author: justin saad

Justin Saad is first and foremost a husband and a father of four. He is also a web developer and designer who has been making websites for over twenty years. His company is called The Motech Network and his website is In addition to building websites, Justin makes WordPress plugins and likes writing tutorials to help others learn about various aspects of web development.

One thought on “Implement Google reCAPTCHA v3

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">