How to add Captcha in Web-to-Lead Salesforce ?

How to add Captcha in Web-to-Lead Salesforce ?

To Add the captcha in your web-to-lead form, you need to generate it first from Google.

Please follow below steps : 

1. Visit google captcha link and login to your Admin Console 

2. Register a new captcha and submit as shown below : 

3. After submitting it you will receive the Site Key & Site Secret. Save it somewhere as we will be using it in salesforce.

4. Now login to your salesforce org and go to web-to-lead from quick find box.

5. Make sure your Web-to-Lead Enabled & Require reCAPTCHA verification is checked as shown below : 

6. Click on create web-to-lead form button.

7. Select required fields and insert the Return url, then click on the search icon near reCAPTCHA API key pair box as shown below : 

8. Create a new captcha key pair and save it.

9. Use this key pair name in captcha textbox.

10. Click Generate button to generate the HTML code.

Note : Make sure you use the form in the same domain for which you have registered the CAPTCHA otherwise it won't work

If you have any question please leave a comment below.
If you would like to add something to this post please leave a comment below.
Share this blog with your friends if you find it helpful somehow !

Keep Coding 😊

Post a Comment


  1. Hello, I have a question about the connection to Salesforce.
    I understand the Salesforce setup that generate the html code to include in the custom web site but i do not understand how the connection will be made.
    How the custom code will connect to Salesforce ? Do we need to create first a connected Apps and add API Call in the custom web site to first connect to the Salesforce Connected app and then that will allow the web-2-lead html code to work ?
    I hope my question makes sense.

    Thanks in advance for your help.

    1. Hello JÉJÉ, so basically it's kind of a web api call that can be triggered using the web to lead form.