How to set Captcha in Magento 2
Having a Captcha on your store is quite important. Captcha or Completely Automated Public Turing test to Tell Computers and Humans Apart is a technique to distinguish between humans and computers. Captcha is mainly used as a security check to ensure only human users can pass through.
To set it up, follow the below steps:
1. Set CAPTCHA for Admin Store
For extra security, you can add CAPTCHA to the Admin Sign-in page.

To set it up, go to:
Admin -> Stores -> Settings -> Configuration -> Advanced -> Admin -> Scope: Select Store -> Captcha
- Enable CAPTCHA in Admin [Yes / No] – Set to Yes if you want Captcha to appear on the Admin Page.
- Font – The font is set to default: LinLibertine.
- Forms – If you want to set both options, press CTRL and select the second option as well.
- Displaying Mode [Always / After a number of attempts to login]
- Number of Unsuccessful Attempts to Login – If 0 is specified, CAPTCHA on the Login form will always be available.
- CAPTCHA Timeout (minutes) – Set the number of minutes before the CAPTCHA expires. After expiry, the Admin needs to reload the page before attempting again.
- Number of Symbols – Set up to 8 symbols (e.g., 3–5).
- Symbols Used in CAPTCHA – Enter a-z (A-Z) letters and numbers 0–9 that you want to randomly appear in the CAPTCHA.
- Case Sensitive [Yes / No] – Set to Yes if you want Admins to enter the exact upper/lowercase as shown in the CAPTCHA image.
Click Save Config.
2. Set CAPTCHA for the Storefront
You can set CAPTCHA for customers to appear each time they log in or only after a few unsuccessful attempts.

To set it up, go to:
Admin -> Stores -> Settings -> Configuration -> Customers -> Customer Configuration -> CAPTCHA
- Enable CAPTCHA on Storefront [Yes / No] – Enable or disable CAPTCHA for customers.
- Font – The font is set to default: LinLibertine.
- Forms – If you want multiple options, press CTRL and select where the CAPTCHA should appear (options shown in the image above).
- Displaying Mode [Always / After a number of attempts to login]
- Number of Unsuccessful Attempts to Login – If 0 is specified, CAPTCHA on the Login form will always be available.
- CAPTCHA Timeout (minutes) – Set the number of minutes before the CAPTCHA expires. After expiry, the customer must reload the page before trying again.
- Number of Symbols – Set up to 8 symbols (e.g., 3–5).
- Symbols Used in CAPTCHA – Enter a-z (A-Z) letters and numbers 0–9 to randomly appear in the CAPTCHA.
- Case Sensitive [Yes / No] – Set to Yes if customers must match exact uppercase/lowercase characters.
Click Save Config.
If you want to set up Google reCAPTCHA for your store, follow this guide:
How to set up reCAPTCHA on Magento 2
Updated on: 17/09/2025
Thank you!
