Implementing Altcha CAPTCHA in Next.js

3 min read
Static Forms Team

Adding CAPTCHA protection to your Next.js forms doesn't have to be complicated. Altcha provides a privacy-focused solution that's easy to implement and doesn't track your users. Let's add it to a simple contact form.

What You Need

Before starting, make sure you have:

  1. Next.js application
  2. Paid plan - Altcha needs a Static Forms paid plan (Pro or Advanced)
  3. API key - From your Static Forms account

Step 1: Install Altcha

Bash

Step 2: Add Your API Key

Create a .env.local file:

ENV

Step 3: Create a Simple Contact Form

Here's a basic contact form with Altcha verification:

TSX

Step 4: Use the Component

Create a page to use your form:

TSX

Step 5: Enable Altcha

  1. Go to your CAPTCHA settings
  2. Switch to "Altcha" tab
  3. Generate your keys
  4. Save settings

That's It!

Your form now has privacy-focused CAPTCHA protection. The widget automatically:

  • ✅ Loads and verifies challenges
  • ✅ Works without tracking users
  • ✅ Protects against spam
  • ✅ No puzzles for users to solve

Need Help?