ALTCHA is a free, open source application security project written in TypeScript and released under MIT. It has 2,757 GitHub stars, 132 forks and 0 open issues, and was last pushed 7 days ago. On this registry it ranks #9 of 16 tracked projects in Application Security, with 5 head-to-head comparisons available. It gained 10 stars over the last 6 tracked days.

What is ALTCHA?

What it is

ALTCHA is self-hosted privacy-first security tool. It lives in TypeScript open-source web component ecosystem. It belongs to application security. It protects websites, APIs, and online services from spam, bots, and abuse. It uses proof-of-work mechanism instead of traditional visual puzzles. It is MIT licensed. Operators run it on own infrastructure.

It solves trade-off between bot protection and user privacy. Traditional CAPTCHA services use cookies, tracking, or fingerprinting. They create friction for legitimate users. ALTCHA uses background proof-of-work, cookie-free operation, and accessibility fallbacks. It is compliant with GDPR, HIPAA, CCPA, PIPEDA/CPPA, LGPD, DPDPA, PIPL, WCAG 2.2 AA, and European Accessibility Act.

Key capabilities

  • Proof-of-work challenge verifies user requests without visual puzzle solving.
  • Argon2 and Scrypt memory-bound algorithms raise cost of attacks using ASICs, GPUs, and bot farms.
  • Audio-assisted image code fallback supports visually impaired users and accessibility compliance.
  • Cookie-free design avoids tracking, fingerprinting, and data collection.
  • Web component installation works with React, Vue, Svelte, Solid, Lit, and Angular starter templates.
  • Server libraries exist for TypeScript, Dart, PHP, Go, Python, Java, Ruby, Elixir, Rust, and C++.
  • It has minimal footprint, optimized verification, reduced CPU overhead, new themes, and improved TypeScript support.

Who uses it and how

  • Website operators add widget to forms to block spam submissions.
  • API builders integrate server verification with application backends written in supported languages.
  • Self-hosters replace third-party CAPTCHA services with local proof-of-work validation and no dependency on external API availability.
  • Accessibility-focused teams use code-from-image fallback and audio support to meet WCAG 2.2 AA and EAA requirements.
  • Framework teams start from React, Vue, Svelte, Solid, Lit, or Angular examples to embed widget in existing applications.

Getting started

Typical installation uses npm install altcha and imports web component in main JavaScript file, or loads it with script tag and adds altcha-widget element to forms. Server-side verification follows project server documentation and can use available language libraries.

When to use it — and when not to

ALTCHA suits self-hosted applications needing privacy, accessibility, and CAPTCHA-alternative protection instead of hcaptcha or recaptcha. It is less suitable for teams wanting hosted CAPTCHA service with no server integration or infrastructure responsibility. Because it is self-hosted, operators must run and maintain verification path themselves, and provided facts do not describe hosted option, database, storage, SMTP, or other managed backend components.

project readme (upstream, from github) — read inline

ALTCHA

ALTCHA is a self-hosted, privacy-first security solution that protects your websites, APIs, and online services from spam and abuse through an innovative proof-of-work mechanism. Unlike traditional CAPTCHAs that depend on intrusive methods like cookies or fingerprinting, ALTCHA delivers robust protection while respecting user privacy.

ALTCHA is fully compliant with:

For more details, visit altcha.org.

Playground

Want to see it in action? Visit the official ALTCHA Playground to experiment with widget configurations, fine-tune the Proof-of-Work (PoW) settings, and see how the security mechanisms hold up in real-time.

Open ALTCHA Playground

Features

  • Frictionless Experience: Eliminates frustrating visual puzzles by using background Proof-of-Work (PoW) for a seamless user journey.
  • Hardware-Resistant Security: Leverages Argon2 and Scrypt memory-bound algorithms to neutralize hardware acceleration (ASICs/GPUs) and sophisticated bot farms.
  • Accessible Code Challenges: Provides "Enter code from image" fallbacks with built-in audio support for visually impaired users.
  • Privacy by Design: Fully GDPR compliant and cookie-free—no tracking, no fingerprinting, and no data collection.
  • Universal Accessibility: Engineered to exceed WCAG 2.2 AA standards, ensuring compliance with the European Accessibility Act (EAA).
  • Lightweight: Minimal footprint, optimized for rapid page loads and high-performance environments.
  • 100% Self-Hosted: Maintain full sovereignty over your infrastructure with no reliance on third-party API availability.

What’s New in v3

  • Next-Gen PoW: Significant performance gains and reduced CPU overhead through an optimized verification mechanism.
  • Advanced Bot Defense: Native support for Argon2 and Scrypt, raising the cost of attack for automated scripts and specialized hardware.
  • Modern UI: Refined styling options, including a suite of new built-in themes and improved CSS custom property support.
  • Developer Experience: Improved TypeScript support and streamlined integration.

Migrating from v2

See MIGRATION-v2.md.

Examples

Explore starter templates for popular frameworks:

Server Integrations

Plugins & CMS

Usage

The ALTCHA widget is distributed as a Web Component.

1. Install ALTCHA

npm install altcha

Import in your main file:

import 'altcha';

Or load via `` tag:

<script async defer src="/altcha.js" type="module"></script>

2. Add `` to Your Forms

<form>
	<altcha-widget challenge="https://..."></altcha-widget>
</form>

See configuration options or the website integration docs.

3. Integrate with Your Server

Refer to the server documentation for implementation details.

Supported Browsers

ALTCHA works on modern browsers with Web Crypto API support (specifically crypto.subtle - caniuse.com).

Supported:

  • Chrome 67+ (desktop & Android)
  • Edge 79+
  • Firefox 63+ (desktop & Android)
  • Safari 11+ (macOS & iOS)
  • Any browser supporting Web Components + Web Crypto

Not Supported:

  • Internet Explorer 11 (or older)

Bundle Size

ALTCHA is optimized for performance:

Distribution Size (GZIPped)
ALTCHA 34 kB
ALTCHA with all translations 52 kB
Cloudflare Turnstile 85+ kB
hCaptcha 250+ kB
reCAPTCHA 300+ kB

When GZIPped, it totals about 34 kB, making ALTCHA’s widget about ~90% smaller than reCAPTCHA.

Content Security Policy (CSP)

The default bundle includes styles and workers in a single file. For strict CSP compliance, use scripts from /dist/external. Learn more in the documentation.

Configuration

Programmatic Configuration

The widget provides a global $altcha object to manage defaults, register new algorithms, or add custom translations.

To update an existing widget instance, use the .configure() method. This is the preferred way to handle complex objects or functions that cannot be passed via HTML attributes.

// Set defaults for all future widget instances:
$altcha.defaults.set({
	challenge: 'https://api.example.com/challenge',
	debug: true
});

// Update a specific instance dynamically:
const widget = document.querySelector('altcha-widget');
widget.configure({
	workers: 2,
	language: 'fr'
});

Attribute Configuration

For simple implementations, the widget supports a subset of configuration options directly as HTML attributes. For more advanced properties, use the programmatic approach above.

Supported Attributes:

<altcha-widget
	auto="off"
	challenge="https://api.example.com/challenge"
	configuration='{"minDuration": 1000}'
	display="standard"
	language="en"
	name="altcha"
	theme="default"
	type="checkbox"
	workers="4"
></altcha-widget>

[!TIP] The configuration attribute accepts a JSON-encoded string, allowing you to pass complex settings directly in your HTML markup.

Core Settings

  • name: The name attribute of the hidden input field containing the payload. (Default: "altcha")
  • challenge: The challenge data or the URL to fetch a new challenge from.
  • type: Visual style of the interaction element ('native', 'checkbox', or 'switch').
  • language: The ISO alpha-2 language code for localization (requires corresponding i18n file).
  • workers: The number of Web Workers to spawn for proof-of-work calculations.

Automation & Timing

  • auto: Determines when verification triggers automatically ('off', 'onfocus', 'onload', or 'onsubmit').
  • minDuration: The minimum verification time in milliseconds; adds an artificial delay if the PoW is faster. (Default: 500)
  • retryOnOutOfMemoryError: Automatically attempts to restart verification with fewer workers if the browser runs out of memory (Argon2 and Scrypt only).

UI & Display

  • display: The visual layout mode ('standard', 'bar', 'floating', 'overlay', or 'invisible').
  • barPlacement: Vertical position of the widget when display is set to bar ('bottom' or 'top').
  • hideLogo: Hides the ALTCHA logo icon.
  • hideFooter: Hides the "ALTCHA" attribution link.
  • validationMessage: Custom validation message for the HTML5 setCustomValidity API.

Floating Widget Settings

  • floatingAnchor: The element or CSS selector the floating UI attaches to. Defaults to the first submit button.
  • floatingPlacement: Preferred position relative to the anchor ('auto', 'bottom', or 'top').
  • floatingOffset: Vertical offset in pixels between the UI and its anchor. (Default: 12)
  • floatingPersist: Whether the floating widget remains visible after successful verification.
  • popoverPlacement: Preferred position of popovers relative to the widget ('auto', 'bottom', or 'top').

Modal & Challenge Settings

  • codeChallengeDisplay: UI layout for the code-challenge modal ('standard', 'overlay', or 'bottomsheet').
  • overlayContent: CSS selector for an element to be mirrored inside the overlay modal.
  • audioChallengeLanguage: Forces a specific language for audio-base

readme truncated — read the full docs on github

Frequently asked questions

Is ALTCHA free to use?

ALTCHA is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does ALTCHA do?

Next-Gen CAPTCHA and Spam Protection, GDPR compliant

What is ALTCHA written in?

ALTCHA is primarily written in TypeScript. Its source is publicly available at https://github.com/altcha-org/altcha, and it has 2,757 GitHub stars.