# TLS fingerprinting for bot detection: JA3 and JA4 explained

> TLS fingerprinting identifies the software behind a connection from its ClientHello, the first message a client sends when it opens HTTPS. JA3 hashes the TLS version, cipher suites, extensions and curves in the order sent, so Chrome's random extension order broke it. JA4 sorts ciphers and extensions and adds a readable prefix, giving one stable value per client library and version, shared by all its users.

Category: Bot detection. Level: Advanced. Updated: 2026-11-24.
Canonical page: https://stopbots.io/learn/detection/tls-fingerprinting-ja3-ja4/

Before a browser sends a single HTTP header, it opens the TLS connection with a ClientHello message. That message lists what the client supports, and the list is built by the client's TLS library. Chrome uses BoringSSL, Firefox uses NSS, Safari uses Apple's own stack, and curl, Python and Go programs each use their own library with their own defaults. A bot can type any User-Agent it likes, but unless it replaces its TLS stack, the ClientHello still tells the server which library opened the connection.

## What does a TLS ClientHello contain?

The ClientHello is sent before encryption starts, and every TLS client has to fill in the same fields, defined for TLS 1.3 in [RFC 8446](https://www.rfc-editor.org/rfc/rfc8446):

- A legacy version field, plus the `supported_versions` extension that lists the versions the client really accepts (TLS 1.3 clients put 1.3 there).
- The cipher suites the client offers, in its order of preference.
- A list of extensions. Common ones are `server_name` (SNI, the hostname being visited), ALPN (the application protocols offered, such as `h2` and `http/1.1`), `supported_groups` (the key exchange groups, such as X25519 and, in recent browsers, post-quantum hybrids), `signature_algorithms`, `key_share`, session ticket and certificate status options.
- GREASE values ([RFC 8701](https://www.rfc-editor.org/rfc/rfc8701)), random reserved values that Chrome and some other clients insert so servers stay tolerant of unknown values. Fingerprinting methods ignore them.

Which ciphers, extensions and groups appear, and in which order, differs between libraries and often between versions of the same library. That variation is what a TLS fingerprint captures.

## How does JA3 work?

[JA3](https://github.com/salesforce/ja3), created at Salesforce in 2017, takes five fields from the ClientHello as decimal numbers: TLS version, cipher suites, extensions, elliptic curves (supported groups) and point formats. Fields are joined by commas, values inside a field by dashes, GREASE is dropped, and the string is hashed with MD5. The example from the JA3 repository:

```txt
769,47-53-5-10-49161-49162-49171-49172-50-56-19-4,0-10-11,23-24-25,0
```

Its MD5 hash, `ada70206e40642a3e4461f35503241d5`, is the JA3 fingerprint. JA3S applies the same idea to the server's reply. JA3 hashes became a standard field in threat intelligence feeds and WAF rules. Salesforce archived the repository in 2025, and its creator now maintains JA4.

## Why did Chrome break JA3?

In early 2023 Chrome began shuffling the order of TLS extensions in every ClientHello. The goal was to stop servers and middleboxes from depending on one fixed order, a problem known as protocol ossification. JA3 hashes extensions in the order they are sent, so a single Chrome install produces a different JA3 on almost every connection. [Fastly's analysis](https://www.fastly.com/blog/a-first-look-at-chromes-tls-clienthello-permutation-in-the-wild) of the rollout shows the effect on real traffic. Allowlists of "known Chrome JA3 hashes" stopped working, even though the set of extensions Chrome sends did not change.

## How does JA4 work?

[JA4](https://github.com/FoxIO-LLC/ja4), published by FoxIO in 2023, fixes this by sorting, and it makes the first part readable. A JA4 fingerprint has three parts joined by `_`, in the layout `a_b_c`. This Chrome fingerprint appears in the JA4 repository:

```txt
t13d1517h2_8daaf6152771_cb7bf5808d99
```

The `a` part, `t13d1517h2`, reads left to right:

- `t` is TLS over TCP. `q` means QUIC and `d` means DTLS.
- `13` is the highest TLS version offered, here TLS 1.3.
- `d` means an SNI hostname was sent. `i` means no SNI, which usually means the client connected to a bare IP address.
- `15` is the number of cipher suites and `17` the number of extensions, both with GREASE removed. The extension count includes SNI and ALPN.
- `h2` is the first and last character of the first ALPN value. A client offering `http/1.1` first shows `h1`, and a client with no ALPN shows `00`.

The `b` part is the first 12 hex characters of a SHA-256 hash of the cipher suites, sorted. The `c` part is the first 12 hex characters of a SHA-256 hash of the sorted extensions, with SNI and ALPN left out, followed by the signature algorithms in the order the client sent them. Because ciphers and extensions are sorted, Chrome's shuffling no longer changes the result. JA4 also defines raw output forms for analysis, and the wider JA4+ family covers HTTP clients (JA4H), TCP (JA4T) and latency (JA4L). JA4 itself is under the BSD 3-Clause licence; the other JA4+ methods use the FoxIO License, which allows internal use but requires a licence from FoxIO to sell them as part of a product.

## What does a TLS fingerprint tell you?

A TLS fingerprint identifies a client library and its configuration. Millions of people on the same Chrome version share one JA4, so it says nothing about who is visiting. It is useful for questions about what software is visiting:

- A User-Agent that claims a current Chrome or Safari, paired with a JA4 that matches an HTTP library such as Python's or Go's, is a script with a borrowed User-Agent. This contradiction is visible on the very first request, before any JavaScript runs.
- The readable prefix supports simple rules. Browsers visiting a website send SNI and ALPN, so a "browser" with `i` in position four or `00` at the end of the `a` part deserves a challenge.
- A rare JA4 that suddenly sends thousands of requests from hundreds of IP addresses is usually one tool behind rotating proxies. Counting requests and distinct IPs per JA4 per hour shows it quickly.
- A JA4 already tied to an attack can be challenged on sensitive endpoints such as login and checkout, instead of being blocked everywhere.

## Where does TLS fingerprinting go wrong?

Many mistakes come from shared fingerprints. Mobile apps built on common HTTP libraries, uptime monitors, payment webhooks, partner integrations and your own back-end services all send library fingerprints, often with honest User-Agents. Rules should combine JA4 with the endpoint and the User-Agent claim, and APIs need their own policy (see [how to protect APIs from bots](https://stopbots.io/learn/implementation/how-to-protect-apis-from-bots.md)).

Corporate TLS inspection proxies and some antivirus products terminate the browser's TLS and open a new connection themselves. The server then sees the proxy's fingerprint with a real person's browser User-Agent, a common source of [false positives](https://stopbots.io/learn/detection/bot-detection-false-positives.md).

Browser updates change fingerprints when they add extensions or key exchange groups, so any list of "good" JA4 values needs maintenance after each major release.

Libraries exist that copy a browser's ClientHello exactly. Against those, JA4 matches Chrome and the contradiction has to come from elsewhere: the HTTP/2 settings and header order, the JavaScript environment checked by [headless browser detection](https://stopbots.io/learn/detection/headless-browser-detection.md), or behaviour.

If your site sits behind a CDN, your origin only sees the CDN's own TLS connection. The fingerprint has to come from wherever TLS is terminated.

## Where do you get JA4 values?

On Cloudflare, Enterprise customers with Bot Management get the `cf.bot_management.ja4` and `cf.bot_management.ja3_hash` fields in rules, plus aggregated JA4 Signals in Workers, as described in the [JA3/JA4 documentation](https://developers.cloudflare.com/bots/additional-configurations/ja3-ja4-fingerprint/). A starting rule that logs or challenges login requests claiming Chrome over a TLS connection with no ALPN:

```txt
http.request.uri.path eq "/login" and http.user_agent contains "Chrome/" and cf.bot_management.ja4 matches "^t1[23][di][0-9]{4}00_"
```

The JA4 repository lists the CDNs, load balancers and WAFs that expose the value, including AWS WAF, Fastly, Akamai and Google Cloud Armor, plus open-source network tools such as Wireshark, Zeek and Arkime, and modules for NGINX and HAProxy if you terminate TLS on your own servers. The overview in [how bot detection works](https://stopbots.io/learn/detection/how-bot-detection-works.md) shows where TLS signals sit next to the other layers.

## Common questions

### Is JA3 still useful?

Yes, for clients that do not shuffle their extensions, which includes many scripts, malware families and older libraries, so existing JA3 blocklists still catch some traffic. For modern Chrome and other browsers that randomise extension order, JA3 changes on almost every connection and JA4 is the better key.

### Can a JA4 fingerprint identify a person?

No. JA4 describes the TLS stack of a client, and everyone running the same browser version on similar systems sends the same one. It becomes useful only next to other signals, such as the User-Agent, the IP network and the request rate.

### Does Encrypted Client Hello stop TLS fingerprinting?

It stops passive observers on the network from reading the inner ClientHello. The server or CDN that terminates TLS still decrypts it, so a website operator fingerprinting at its own edge keeps the data.

## Related

- [How does bot detection work?](https://stopbots.io/learn/detection/how-bot-detection-works.md)
- [How modern bots are built: headless browsers and stealth](https://stopbots.io/learn/bots/how-modern-bots-are-built.md)
- [How to protect APIs from bots](https://stopbots.io/learn/implementation/how-to-protect-apis-from-bots.md)
- [Can web scraping be detected?](https://stopbots.io/learn/scraping/can-web-scraping-be-detected.md)
