How to Bypass Cloudflare TLS Fingerprinting (JA3) with Python — 2026 Guide
Cloudflare detects bots by hashing TLS Client Hello parameters into a JA3 fingerprint. To bypass it in Python, use curl_cffi with impersonate="chrome120" — it produces Chrome's exact TLS stack. Alternatively, use tls-client for custom fingerprints, or Playwright with playwright-stealth for browser-level automation. Pair with residential proxies for scale.
Cloudflare's Bot Management system does not just check IP reputation or rate limits — it fingerprints the TLS handshake itself. Every HTTP library (Python requests, httpx, Node's axios) produces a unique TLS Client Hello that Cloudflare can identify in milliseconds.
This guide is for developers building legitimate data aggregation tools, price monitors, authorized scrapers, and Telegram bots that need to fetch data from Cloudflare-protected endpoints without triggering bot blocks.
Table of Contents
- What Is TLS Fingerprinting and What Is a JA3 Hash?
- How Does Cloudflare Use JA3 to Detect Bots?
- Method 1 — curl_cffi: Impersonate Chrome's TLS Stack
- Method 2 — tls-client: Custom TLS Fingerprints
- Method 3 — Playwright Stealth: Full Browser Automation
- How to Combine JA3 Spoofing with Residential Proxies
- JA3 vs JA3N vs JA4+: What Changed in 2025?
- Is Bypassing Cloudflare TLS Fingerprinting Legal?
What Is TLS Fingerprinting and What Is a JA3 Hash?
When your browser (or any HTTP client) initiates an HTTPS connection, it sends a TLS Client Hello — an opening message that lists supported cipher suites, TLS extensions, elliptic curves, and compression methods. Different clients produce measurably different Client Hellos.
A JA3 fingerprint is an MD5 hash computed from five fields of that Client Hello:
- SSL/TLS version
- Cipher suites (in the order offered)
- TLS extensions (type codes)
- Elliptic curves
- Elliptic curve point formats
These five fields are concatenated with hyphens, comma-separated within each field, then MD5-hashed. The result is a 32-character hex string — for example, Chrome 120's JA3 is 8a2a545786c1b7c3fe2e0ec1fd60e7b4.
The technique was published by John Althouse, Jeff Atkinson, and Josh Atkins at Salesforce in 2017. It is now a standard signal in every major WAF. Source: github.com/salesforce/ja3.
How Does Cloudflare Use JA3 to Detect Bots?
Cloudflare's Bot Management scores every request for "bot likelihood." JA3 is one of many signals:
- Python
requestsproduces a JA3 hash never seen from real browsers — instant flag. - A
curldefault fingerprint matches no known browser — flag. - Chrome 120 on Windows has a documented, stable JA3 — trusted.
Even if you set a perfect Chrome User-Agent header, your Python requests library still sends a non-Chrome TLS handshake. Headers are application-layer; JA3 is transport-layer — they cannot be faked independently of the underlying TLS library.
Key insight: Changing your User-Agent without changing your TLS library is like wearing a Chrome costume while your TCP handshake says "Python." Cloudflare sees through the costume.
Method 1: How Do You Bypass Cloudflare JA3 with curl_cffi?
curl_cffi is a Python binding for libcurl compiled with Cloudflare's BoringSSL fork — the same TLS library Chrome uses. It produces an exact Chrome TLS fingerprint, not a simulated one.
Install it: pip install curl_cffi
Basic GET request impersonating Chrome 120
Reusing a session across multiple requests (recommended)
Available impersonation targets include chrome99, chrome110, chrome120, chrome124, firefox117, safari17, and more. Match the target to a browser version that your proxy IP would plausibly use.
Method 2: How Do You Use tls-client for Custom Fingerprints?
tls-client is a Go-based library with a Python binding. It lets you construct custom TLS fingerprints from specific cipher suites and extensions — useful when you need a fingerprint not covered by curl_cffi.
Install it: pip install tls-client
Session with Chrome 120 fingerprint and randomized extension order
When to use tls-client vs curl_cffi: Use curl_cffi for most cases — it is actively maintained and handles cookies well. Use tls-client when you need to construct an exact fingerprint that does not map to a preset browser profile.
Method 3: How Do You Use Playwright Stealth for Browser Automation?
For tasks that require JavaScript execution, login flows, or interaction with dynamic content, run a real Chromium browser. playwright-stealth patches the 30+ JavaScript properties that headless Chromium exposes (like navigator.webdriver) to be indistinguishable from a real Chrome session.
Install: pip install playwright playwright-stealth && playwright install chromium
Headless Chromium with stealth mode
Playwright Stealth is slower than curl_cffi but handles the most challenging targets — sites that require JavaScript challenges, cookie consent flows, or interactive CAPTCHAs.
How to Combine JA3 Spoofing with Residential Proxies
JA3 spoofing handles the fingerprint problem. Residential proxies handle the IP reputation problem. Cloudflare scores both. For production scrapers, you need both.
curl_cffi with a residential proxy
See the companion guide — Managing Residential Proxies for Python Web Automation — for proxy pool rotation, backoff strategies, and provider comparisons.
JA3 vs JA3N vs JA4+: What Changed in 2025?
JA3 has known weaknesses — extension order randomization can defeat a static hash. Newer fingerprinting standards address this:
- JA3N: The same as JA3 but with extensions sorted, removing order as a variable. Harder to randomize around.
- JA4+ (2024): A family of fingerprints covering TLS, HTTP/2, QUIC, and SSH. JA4 encodes more fields and is base64-encoded rather than MD5-hashed. Cloudflare began deploying JA4+ signals in late 2024. Source: github.com/FoxIO-LLC/ja4.
In practice, curl_cffi with a modern Chrome impersonation profile (chrome120+) produces correct JA4 fingerprints as well, because it uses the actual Chrome TLS library. It remains the most reliable solution in 2026.
Is Bypassing Cloudflare TLS Fingerprinting Legal?
Legal disclaimer: This section is for general information only and is not legal advice. Laws vary by jurisdiction and use case. Consult a qualified lawyer for your specific situation.
TLS fingerprint spoofing is a technical technique. Legality depends entirely on what you do with it, not the technique itself:
- Generally lawful: Collecting publicly available data (prices, listings, news), monitoring your own infrastructure, authorized penetration testing, academic research.
- Legally risky: Accessing password-protected systems without authorization, violating a site's Terms of Service in jurisdictions that criminalize ToS violations, scraping personal data in ways that breach GDPR or CCPA.
- The hiQ v. LinkedIn precedent (US): The Ninth Circuit held that scraping publicly available data does not violate the CFAA. This does not create a blanket right to scrape — context matters.
Always review a site's robots.txt and Terms of Service, and limit your request rates to avoid degrading service for other users.
Need a Telegram Bot That Fetches Protected Data?
aziqdev builds custom Telegram bots with built-in web automation — JA3-aware HTTP clients, proxy rotation, and Telegram delivery. All source code delivered to you.
Get a Free Quote →Related Articles in This Topic Cluster
- The Ultimate Guide to Telegram Bot Development — Pillar page: everything from basic bots to AI and trading automation
- Managing Residential Proxies for Python Web Automation — Proxy pool rotation, httpx async, Playwright integration
- Telegram Payments API Integration Guide — How to accept payments inside Telegram
- Telegram Trading Bot Development — Exchange API integration, signals, risk management
Sources & Official Documentation
- JA3 original research — github.com/salesforce/ja3 (Salesforce Engineering)
- JA4+ fingerprinting standard — github.com/FoxIO-LLC/ja4 (FoxIO)
- curl_cffi library — github.com/lexiforest/curl_cffi
- Playwright documentation — playwright.dev/python/docs/intro
- Telegram Bot API official documentation — core.telegram.org/bots/api
- Python
sslmodule — docs.python.org/3/library/ssl.html