TCP checks that every packet arrived; UDP just sends and moves on
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are the two ways an app hands data to the internet: TCP confirms delivery and keeps packets in order, UDP sends each packet once and never checks.
Both sit at the transport layer, one step above IP. IP gets a packet to the right machine; TCP or UDP gets it to the right app on that machine and decides what happens when something goes missing on the way.
We think the simplest picture is a phone call versus a postcard. TCP is the call: both sides say hello first, and you repeat anything the other person missed. UDP is a stack of postcards: cheap, quick, and nobody tells you if one fell off the truck.

- 20–60 bytes
- TCP headergrows with options
- 8 bytes
- UDP headeralways the same size
- 3 messages
- TCP handshakeSYN, SYN-ACK, ACK
TCP opens a connection with a three-way handshake; UDP skips it
TCP is connection-oriented: nothing is sent until both sides have exchanged three short messages, and the connection is closed with another exchange at the end.
UDP is connectionless. The first packet is the data itself. There is no setup, no teardown, and no state kept on either side between packets, which is why UDP can also broadcast one packet to many receivers while TCP cannot.
SYN
Your device sends a synchronize message to the server: 'I want to talk, here is my starting sequence number.'
SYN-ACK
The server replies with synchronize-acknowledge: 'Got it, here is mine.'
ACK
Your device acknowledges. Only now does TCP start sending real data.
FIN and ACK to close
When either side is done it sends FIN, the other acknowledges, and the same happens in reverse. That is the four-way close.
TCP resends lost packets and keeps them in order; UDP leaves the gap
TCP guarantees that every byte arrives once, in order, by numbering packets and waiting for acknowledgements; UDP has a checksum to spot a damaged packet, then simply throws it away.
When an acknowledgement does not come back, TCP sends the packet again. It also slows down when the network looks congested (congestion control) and when the receiver is falling behind (flow control). To the app, TCP looks like one continuous stream of bytes.
UDP does none of that. Each packet is an independent message. If packet 7 arrives after packet 8, or never arrives, the app gets whatever came through and has to cope. For a voice call that is a tiny crackle; for a bank transfer it would be a disaster, which is why banks never use plain UDP.
UDP is faster because its header is 8 bytes and it waits for nothing
UDP wins on speed for two reasons: an 8-byte header against TCP's 20 to 60 bytes, and no pauses for handshakes, acknowledgements or retransmissions.
On a clean wired connection the difference per packet is small. On a lossy Wi-Fi link it is large, because TCP stops to recover every lost packet while UDP keeps streaming. That is the real 'tcp vs udp speed' story: same wire, different behaviour under loss.
| TCP | UDP | |
|---|---|---|
| Connection | Three-way handshake first | None, first packet is data |
| Delivery | Guaranteed, acknowledged | Best effort, no acknowledgement |
| Lost packets | Resent | Dropped |
| Order | Kept | Not guaranteed |
| Flow and congestion control | Yes | No |
| Header size | 20–60 bytes | 8 bytes |
| Data model | Continuous byte stream | Separate messages |
| Broadcast / multicast | No | Yes |
| Typical apps | HTTP, HTTPS, FTP, SMTP | DNS, DHCP, VoIP, streaming |
TCP and UDP ports are the same numbers; the protocol is what differs
A port is a number that tells the receiving machine which app a packet is for, and TCP and UDP each keep their own list of ports, so TCP port 80 and UDP port 80 are different doors.
That is why a router rule has to say both the port and the protocol. Some services open the same number on both: DNS, for example, answers on UDP for ordinary lookups and on TCP for large answers. Inside the IP header a separate protocol number tells the receiving machine whether to hand the packet to TCP or to UDP before any port is looked at.
Runs on TCP
- Web pages (HTTP and HTTPS)
- Email sending (SMTP)
- File transfer (FTP)
- Anything where every byte must arrive
Runs on UDP
- DNS lookups
- DHCP (getting an IP address)
- Voice and video calls (VoIP)
- Live streaming and most online games
Use UDP when a late packet is useless; use TCP when a missing packet is unacceptable
Pick UDP for anything live, because by the time TCP had resent a lost voice packet the conversation would have moved on; pick TCP for anything that must be complete, like a web page, a download or an email.
Games are the clearest case. A position update from 200 ms ago is worthless, so game engines send over UDP and just use the newest packet. Video calls do the same, which is why you hear a brief glitch rather than a long freeze.
Downloads, logins and payments go the other way. One missing byte corrupts a file or breaks a login, so TCP's slower, checked delivery is the only sensible choice.
VPN UDP vs TCP: UDP by default, a TCP-style route where other VPNs stop
Most VPN tunnels run over UDP because it is faster and because the traffic inside the tunnel is already TCP where it needs to be; a TCP-mode tunnel is mostly a fallback for networks that only let web-style traffic through.
Running TCP inside a TCP tunnel is slow: both layers resend the same lost packet and both back off at once. This is the 'OpenVPN UDP vs TCP' trade-off you see in older apps that make you choose. UDP for speed, TCP when UDP will not connect.
Teal VPN, made by Fxolio LLC, has a Free plan (500 MB a day) and a Pro plan, with apps for Android, Windows, Mac, Linux, Android TV and Chromebook. The app does not ask you to pick TCP or UDP. Teal Secure is on for every connection and every plan: the traffic is obfuscated, and when a network closes one route the app tries other routes by itself. No VPN is guaranteed to connect on every network, so check the local rules before you travel. Once connected, Teal VPN's leak test at tealvpn.com/ip-leak-test shows which DNS servers are answering your UDP lookups.

HTTP rides on top of TCP, and ICMP is neither TCP nor UDP
HTTP is not a rival to TCP or UDP but a layer above them: classic HTTP and HTTPS travel inside TCP, while the newer HTTP/3 travels inside UDP with its own reliability built on top.
ICMP is the odd one out. It sits beside TCP and UDP rather than above them, has no ports at all, and carries control messages such as the ones ping and traceroute use. So 'tcp vs udp vs icmp' is really three different jobs: deliver data reliably, deliver data fast, and report on the network itself.
Keep reading
References
- GeeksforGeeks: TCP vs. UDP
- IPCisco: TCP versus UDP, ports and headers
- AVG: TCP vs. UDP key differences and uses
Need help with Teal? Contact support.
Questions
Is UDP faster than TCP?
Yes. UDP has an 8-byte header, no handshake and no retransmissions, so it carries less overhead and never pauses. The gap is small on a clean link and large on a lossy one.
Which is more secure, TCP or UDP?
Neither encrypts anything on its own. Security comes from the layer above, such as HTTPS over TCP or a VPN tunnel over UDP. TCP is harder to spoof because of its handshake, but that is a reliability feature, not encryption.
Does a VPN use TCP or UDP?
Most VPN protocols default to UDP for speed. Some apps offer a TCP mode for networks that restrict UDP. Teal VPN's app picks the route by itself and switches when one stops working, as of November 2026.
OpenVPN UDP vs TCP: which should I pick?
UDP unless it fails to connect. TCP mode works on more strict networks but is slower, because TCP inside TCP doubles the retransmissions when a packet is lost.
Can UDP be used for file transfers?
Only if the app adds its own checks on top. Plain UDP drops lost packets, so a file would arrive with holes. That is why FTP and most download tools use TCP.
Do TCP and UDP use the same ports?
The port numbers are the same range, but each protocol has its own set, so TCP port 80 and UDP port 80 are separate. A router rule needs both the number and the protocol.
Why do games use UDP?
Because an old position update is useless. UDP delivers the newest packet right away instead of stopping to resend the one before it, which keeps the game responsive.