# HTTP/2 vs HTTP/3

URL: https://softwaredictionary.org/compare/http-2-vs-http-3
Last updated: 2026-10-06

In short: Both send many requests over one connection; HTTP/2 runs on TCP, where one lost packet stalls every stream, while HTTP/3 runs on QUIC over UDP.

## What is the difference between HTTP/2 and HTTP/3?

HTTP/2 and HTTP/3 are two versions of the same protocol: the methods, status codes, headers and URLs are identical, and application code such as a `fetch` call works the same over both. HTTP/2, standardized in 2015, let one connection carry many requests at once in binary frames instead of one at a time. HTTP/3, published in 2022 as RFC 9114, keeps that model but swaps the transport underneath: instead of TCP with TLS on top, it runs over QUIC, a protocol built on UDP with TLS 1.3 built in.

The change exists because of a limit in TCP. TCP delivers bytes strictly in order, so when one packet is lost, every HTTP/2 stream on the connection waits for the retransmission, even streams whose data has already arrived. QUIC delivers each stream independently, so a lost packet delays only the file it belongs to. QUIC also sets up a connection in one round trip instead of two or three, lets a returning visitor send a request in the very first packet, and keeps a download going when a phone switches from Wi-Fi to mobile data.

In practice the two work together. A browser first connects over HTTP/2 or HTTP/1.1, learns from an `Alt-Svc` header or a DNS HTTPS record that the server supports HTTP/3, and switches for later requests, falling back to TCP when a network blocks UDP. All major browsers and CDNs support both, so enabling HTTP/3 is usually a configuration change on the server or CDN, with HTTP/2 kept as the fallback.

A common misconception is that HTTP/3 makes every site noticeably faster. On fast, stable connections the difference is often small; the gains show up on mobile and lossy networks and on first visits. Another is that HTTP/3 is less secure because it uses UDP: encryption is mandatory in QUIC, and even more of each packet's metadata is encrypted than with TLS over TCP.

| Aspect | HTTP/2 | HTTP/3 |
| --- | --- | --- |
| Transport | TCP | QUIC, built on UDP |
| Encryption | TLS on top of TCP; browsers require it | TLS 1.3 built into QUIC; always on |
| Packet loss | One lost packet stalls every stream on the connection | A lost packet delays only its own stream |
| Connection setup | Separate TCP and TLS handshakes: 2 to 3 round trips | One combined handshake: 1 round trip, or 0 when resuming |
| Header compression | HPACK | QPACK, adapted to independent streams |
| Changing networks | The connection breaks and must be reopened | The connection survives a switch from Wi-Fi to mobile data |
| Support | Universal in browsers, servers, proxies and CDNs | All major browsers and CDNs; some networks block UDP |

## Choose HTTP/2 when

- Clients sit behind networks or firewalls that block or throttle UDP.
- Your server, proxy or load balancer doesn't support QUIC yet.
- Traffic stays between services in one data center, where packets are rarely lost.
- You rely on tools built on HTTP/2, such as most gRPC setups.

## Choose HTTP/3 when

- Many visitors are on mobile or unreliable networks where packets get lost.
- Users move between networks, such as from Wi-Fi to mobile data, during a session.
- Fast first connections matter, for example on short visits from search results.
- Your CDN or server supports it, so turning it on costs only configuration.

## Frequently asked questions

**Do I need to change my code for HTTP/3?**

No. Requests, responses, headers and status codes are the same, so application code doesn't change; HTTP/3 is enabled on the server, load balancer or CDN.

**Is HTTP/3 replacing HTTP/2?**

Not any time soon. Browsers start on HTTP/2 or HTTP/1.1 and fall back to TCP when UDP is blocked, so servers keep offering both side by side.

**Why does HTTP/3 use UDP instead of TCP?**

TCP is built into operating systems and network devices, so changing how it works would take many years. Building QUIC on top of UDP let its designers add independent streams and faster handshakes in ordinary software that updates as often as browsers do.

---

Software Dictionary: https://softwaredictionary.org/ · https://softwaredictionary.org/llms.txt
