How to Solve Cloudflare Turnstile
The box above is a live Cloudflare Turnstile challenge. This page shows three easy ways to solve Cloudflare Turnstile and get a valid cf-turnstile-response token: automatically with the CapSkip browser extension, in your own code with the CapSkip SDK, or by routing the captcha service your tools already call to CapSkip. CapSkip is a fast, unlimited Cloudflare Turnstile solver that runs locally on your device, so there are no per solve fees and nothing leaves your machine.
Option 1: Solve Cloudflare Turnstile with the browser extension
The simplest way to bypass Cloudflare Turnstile is the CapSkip captcha solver extension for Chrome and Firefox. It detects the Turnstile widget on any page and solves it automatically in the background, with no code to write and no token to copy.
Install the extension
Add CapSkip from the Chrome Web Store or Firefox Add-ons. It also works in Brave, Edge, Opera and Vivaldi.
Run the CapSkip app
Install and open the CapSkip desktop app. It does the solving on your own device and pairs with the extension.
It solves automatically
Reload this page and CapSkip clears the Turnstile for you. Prefer to stay in control? Switch to manual mode anytime.
Option 2: Solve Cloudflare Turnstile with the CapSkip SDK
Building automation, a scraper or a bot? Use the CapSkip captcha solving SDK to solve Cloudflare Turnstile from Python, Node.js, PHP or C#. You pass this page's site key and URL, and CapSkip hands back a fresh Turnstile token you can submit like a real one.
0x4AAAAAADogn3t3_JKwKkgS
https://capskip.com/captcha-demo/cloudflare-turnstile/
Before you start
CapSkip solves locally. Download and run the CapSkip desktop app and keep it open in the background. The SDK talks to it on 127.0.0.1:8080, so there are no cloud calls and no per solve fees.
Install the SDK
Add the official CapSkip client to your project.
pip install capskipnpm install capskipcomposer require capskip/capskipdotnet add package CapSkipSolve the Turnstile and get a token
Pass this page's sitekey and url to turnstile(). CapSkip returns a fresh cf-turnstile-response token.
from capskip import CapSkip
# Connect to the CapSkip app running on your machine
solver = CapSkip(host="127.0.0.1", port=8080)
# Solve the Turnstile shown on this page
result = solver.turnstile(
sitekey="0x4AAAAAADogn3t3_JKwKkgS",
url="https://capskip.com/captcha-demo/cloudflare-turnstile/",
)
token = result["code"] # the cf-turnstile-response token
print(token)const { CapSkip } = require('capskip');
// Connect to the CapSkip app running on your machine
const solver = new CapSkip({ host: '127.0.0.1', port: 8080 });
(async () => {
// Solve the Turnstile shown on this page
const result = await solver.turnstile(
'0x4AAAAAADogn3t3_JKwKkgS',
'https://capskip.com/captcha-demo/cloudflare-turnstile/',
);
const token = result.code; // the cf-turnstile-response token
console.log(token);
})();<?php
require 'vendor/autoload.php';
use CapSkip\CapSkip;
// Connect to the CapSkip app running on your machine
$solver = new CapSkip(['host' => '127.0.0.1', 'port' => 8080]);
// Solve the Turnstile shown on this page
$result = $solver->turnstile(
'0x4AAAAAADogn3t3_JKwKkgS',
'https://capskip.com/captcha-demo/cloudflare-turnstile/'
);
$token = $result['code']; // the cf-turnstile-response token
echo $token;using CapSkip;
// Connect to the CapSkip app running on your machine
var solver = new CapSkipClient(host: "127.0.0.1", port: 8080);
// Solve the Turnstile shown on this page
var result = await solver.TurnstileAsync(
"0x4AAAAAADogn3t3_JKwKkgS",
"https://capskip.com/captcha-demo/cloudflare-turnstile/");
string token = result.Code; // the cf-turnstile-response token
Console.WriteLine(token);You get a long token that starts with 1. and is valid for this site key, ready to submit.
Use the token
Put the token into the widget's hidden cf-turnstile-response field. Some pages also read it from g-recaptcha-response. If a callback was defined in the turnstile.render() config, run it with the token. Then submit the form, and your server verifies it with Cloudflare siteverify. Note that the Check button on this page reads the token straight from the widget with turnstile.getResponse(), so it verifies the widget's own token rather than one you place in the field.
// 1. Drop the solved token into the Turnstile response field
document.querySelector('[name="cf-turnstile-response"]').value = token;
// Some implementations also read it from g-recaptcha-response:
// document.querySelector('[name="g-recaptcha-response"]').value = token;
// 2. If a callback was defined in turnstile.render(), run it with the token
if (window.tsCallback) window.tsCallback(token);
// 3. ...then submit your form.Turnstile on a Cloudflare Challenge Page
Some sites sit fully behind Cloudflare and show a Turnstile challenge page before the content loads. Here you also need three values from turnstile.render(): cData, chlPageData and action. You then submit the token with the exact User-Agent that CapSkip returns.
1. Intercept the parameters (inject this before Turnstile loads)
// Override turnstile.render to capture the challenge parameters
const i = setInterval(() => {
if (window.turnstile) {
clearInterval(i);
window.turnstile.render = (container, params) => {
window.tsParams = {
sitekey: params.sitekey,
pageurl: window.location.href,
data: params.cData,
pagedata: params.chlPageData,
action: params.action,
};
window.tsCallback = params.callback; // call this with the solved token
console.log(JSON.stringify(window.tsParams));
return 'foo';
};
}
}, 50);2. Solve with the captured values, then reuse the returned User-Agent
result = solver.turnstile(
sitekey="0x4AAAA...", # params.sitekey
url="https://the-protected-site.com/",
data="init_data...", # params.cData
pagedata="chl_page_data...", # params.chlPageData
)
token = result["code"]
user_agent = result["userAgent"] # submit the token with this exact User-Agentconst result = await solver.turnstile(
'0x4AAAA...', // params.sitekey
'https://the-protected-site.com/',
{ data: 'init_data...', pagedata: 'chl_page_data...' },
);
const token = result.code;
const userAgent = result.userAgent; // submit the token with this exact User-Agent$result = $solver->turnstile(
'0x4AAAA...', // params.sitekey
'https://the-protected-site.com/',
['data' => 'init_data...', 'pagedata' => 'chl_page_data...']
);
$token = $result['code'];
$userAgent = $result['userAgent']; // submit the token with this exact User-Agentvar result = await solver.TurnstileAsync(
"0x4AAAA...", // params.sitekey
"https://the-protected-site.com/",
new Dictionary<string, object?> { ["data"] = "init_data...", ["pagedata"] = "chl_page_data..." });
string token = result.Code;
string userAgent = result.UserAgent; // submit the token with this exact User-AgentThe raw HTTP API also accepts an optional action value and a proxy, which helps when the site checks that the token was generated from your own IP.
Not using Python, Node.js, PHP or C#? The SDKs are just wrappers over the CapSkip HTTP API (the standard in.php / res.php endpoints), so you can solve Cloudflare Turnstile from any language, framework or tool. See the Turnstile API reference.
Option 3: Send your existing solver-service code to CapSkip
Already solving Cloudflare Turnstile through a pay-per-captcha service such as 2Captcha, Anti-Captcha or CapMonster? You do not have to rewrite a line. The CapSkip app includes a service emulator that speaks those services' own APIs locally: pick the service you use, click Add to hosts file, and every request your bot, scraper or off-the-shelf tool already sends to it is answered by CapSkip on your own machine, for a flat price instead of a per-solve bill.
Pick your service
Open the CapSkip app and choose the service your code already talks to: 2Captcha, RuCaptcha, Anti-Captcha, CapMonster Cloud, CapSolver, DeathByCaptcha, SolveCaptcha or Captchas.io.
Add to hosts file
One click in the app points that service's domain at CapSkip, so the calls your tool makes are answered on your own machine instead of going out to a paid API.
Run your tool unchanged
Same API key, same request, same polling loop. CapSkip replies in that service's own format and your code gets a valid cf-turnstile-response token back.
Nothing below changes when you switch. It is the same call your code makes today, except that Cloudflare Turnstile is now solved locally and a valid cf-turnstile-response token comes back from CapSkip:
POST https://2captcha.com/in.php
key=YOUR_EXISTING_API_KEY
method=turnstile
sitekey=0x4AAAAAADogn3t3_JKwKkgS
pageurl=https://capskip.com/captcha-demo/cloudflare-turnstile/
GET https://2captcha.com/res.php?key=YOUR_EXISTING_API_KEY&action=get&id=2122988149
OK|0.sBQmB… the cf-turnstile-response token, solved by CapSkipClient libraries work the same way: an Anti-Captcha style createTask / getTaskResult pair, or any wrapper built on one of these services, keeps working once the emulator is on. The full request and response reference lives in the CapSkip API docs.
More on solving Cloudflare Turnstile
Guides for the tools and languages people usually pair with this demo.
About this Cloudflare Turnstile demo
This page is a live Cloudflare Turnstile demo where you can test how Cloudflare Turnstile works and watch it get solved in real time. Turnstile is Cloudflare's modern CAPTCHA and reCAPTCHA alternative that verifies visitors with browser and behavioral signals, often with no puzzle to click. Use it to explore Turnstile token generation, the cf-turnstile-response value, and the verification flow that websites rely on to protect forms, logins and signups from spam, abuse and bots.
Developers, testers and automation engineers can use this Cloudflare Turnstile test page to check integrations, validate a setup and benchmark how fast CapSkip solves Turnstile. Whether you need to solve Cloudflare Turnstile once or automate thousands of solves, CapSkip is a Cloudflare Turnstile solver that works three ways: the no-code captcha solver extension for Chrome and Firefox, and the captcha solving SDK for Python, Node.js, PHP and C#, and drop-in emulation of the captcha services you may be paying per solve today, all with unlimited solving on one flat price. All three are driven by the same desktop AI captcha solver, installed once and running on your own machine, so nothing is queued on a remote server and nothing is billed per solve.
