TodayTools

Compare protocols

TCP vs UDP: the real difference and when to use each

Donate
What brings you here?

The difference at a glance

TCP

Transmission Control Protocol

Best for: Files, web pages and email

Shakes hands first, then sends again anything that got lost.
  1. SYN, from You
  2. SYN-ACK, from Server
  3. ACK, from You
  4. Part 1, from You
  5. Part 2, from Youlost
  6. Part 2 again, from You

UDP

User Datagram Protocol

Best for: Calls, games, live video and DNS

Just sends. A lost packet stays lost and the next one carries on.
  1. Move 1, from You
  2. Move 2, from Youlost
  3. Move 3, from You
  4. Move 4, from You

The short answer

TCP opens a connection first and makes sure every byte arrives, in order, resending anything lost. UDP just sends each packet and hopes for the best, with no handshake and no resends. TCP is for web pages, email and files, where every byte matters. UDP is for calls, games, live video and DNS, where speed matters more than a missing packet.

Which one fits you?

Tick everything that is true for you.

What do you need?

Your pick shows here

Tick one or more lines and we weigh them for you.

TCP and UDP side by side

TCP vs UDP: differences row by row
What differsTCPUDP
ConnectionYes, a three-way handshake (SYN, SYN-ACK, ACK) firstNo, the first packet carries data
DeliveryGuaranteed: lost segments are sent againNot guaranteed: a lost datagram is gone
OrderBytes arrive in the order they were sentDatagrams may arrive out of order
Header size20 to 60 bytes8 bytes
Speed controlFlow and congestion control slow it down on a busy pathNone built in; the app decides
Broadcast and multicastNo, one to one onlyYes
Typical usesWeb (HTTP/1.1, HTTP/2), email, SSH, file transferDNS, voice and video calls, online games, QUIC and HTTP/3
StandardRFC 9293RFC 768

Watch each one work

Each page plays the real packets on a map, step by step, with every header explained.

Test yourself

Each line describes one of the two. Which one?

Question 1 of 8

Connection

Yes, a three-way handshake (SYN, SYN-ACK, ACK) first

Questions people ask

Is UDP faster than TCP?

UDP starts sending at once and never waits for lost packets, so it has less delay. On a clean network the raw speed is similar. TCP feels slower when packets are lost, because it holds later data until the missing piece is resent.

Does HTTPS use TCP or UDP?

HTTPS with HTTP/1.1 or HTTP/2 uses TCP port 443. HTTP/3 uses QUIC, which runs on UDP port 443. Browsers try HTTP/3 when the server offers it and fall back to TCP.

Does DNS use TCP or UDP?

Most DNS questions go over UDP port 53 because they are small. DNS switches to TCP for large answers and for zone transfers between servers.

Why do games and video calls use UDP?

A resent packet with an old position or old sound arrives too late to help. UDP lets the app skip it and play the next one, which keeps the call or game smooth.

More comparisons

Donate