UDP Explained: The Internet’s Fast, Forgetful Messenger

UDP explained in plain terms means a way of sending data across the internet quickly, without first setting up a connection and without checking that every packet arrives. The central question is why anyone would trust a delivery service that never confirms receipt, and the short answer is speed: for live video, voice calls, and online games, a packet that arrives late is useless, so it is better to lose it than to wait for it.

Think of it as the difference between sending a postcard and sending a recorded-delivery letter. The letter is tracked at every step, signed for on arrival, and resent if it goes missing, but all of that takes time. The postcard is simply dropped in a box and trusted to the post, with no acknowledgement at all. UDP is the postcard: fast, cheap, and cheerfully unconcerned about whether it turned up.

UDP stands for User Datagram Protocol, and it is one of the two main transport protocols that carry data across the internet, alongside its more careful sibling, TCP. It sits in the transport layer of the networking stack, taking messages from applications and handing them to the internet layer to be routed to their destination.

Key takeaways

  • UDP sends data in independent packets called datagrams, with no connection set up first.
  • It offers no delivery guarantee: packets can be lost, duplicated, or arrive out of order.
  • Its tiny header and lack of handshakes make it much faster than TCP for time-sensitive data.
  • DNS lookups, live video, voice calls, and online games are among its biggest users.
  • Applications that use UDP must handle lost or out-of-order packets themselves.

What UDP is

UDP is a transport protocol, which means it is the set of rules that decides how application data is packaged, addressed, and handed over for delivery across a network. When an application such as a video-calling app has data to send, it passes the data to UDP, which wraps it in a datagram, a single self-contained packet, and sends it on its way.

The protocol is defined in RFC 768, published in 1980, and its design is deliberately minimal. A UDP header is just eight bytes long, carrying only the source port, the destination port, the length of the datagram, and a checksum for basic error detection. UDP does almost nothing beyond addressing and a light check for corruption, and that spareness is the whole point.

The port numbers in the header are what let many applications share one network connection. A port is a number that identifies a particular service on a machine, so a datagram addressed to port 53 is a DNS query, while one addressed to port 123 is a time-synchronisation request.

UDP is connectionless, which is the feature that shapes everything else about it. There is no opening handshake, no session to maintain, and no closing sequence: the sender simply transmits datagrams and the receiver simply accepts whatever arrives. Our guide to DNS explains how the domain name system turns the names you type into addresses, and it relies on UDP for most of its lookups, because a short question and a short answer do not need the machinery of a full connection.

How UDP works

It starts inside the sending application, which asks the operating system to send a message to a particular address and port. UDP wraps that message in a datagram, adds its eight-byte header, and passes it down to the internet layer, which wraps it again in an IP packet and hands it to the network.

On arrival, the process runs in reverse. The receiving machine checks the destination port, hands the datagram to the right application, and verifies the checksum, a small value computed from the datagram’s contents. If the checksum does not match, the datagram has been corrupted in transit, and UDP simply discards it, silently. There is no request for a replacement and no message back to the sender; the loss is the application’s problem.

Because there is no connection, there is also no ordering and no flow control. Datagrams from one sender can take different routes, so they can arrive out of order, and a slow receiver has no way to tell the sender to pause. This sounds careless, and in a sense it is, but for the traffic UDP is built for, a missing piece of a video frame or a dropped voice sample is barely noticeable.

The checksum deserves a closer look, because it is the one concession UDP makes to reliability. It catches accidental corruption, such as a flipped bit, but it is not a security feature: it cannot detect deliberate tampering. Our guide to network security explains the layers of protection that sit around protocols like UDP, and why a checksum is no substitute for encryption or authentication.

A photograph of a dark office at night with a laptop showing glowing green data packets streaming across a network diagram
UDP sends each packet on its own, with no handshake and no confirmation, which is why it is the protocol of choice when speed matters more than certainty.

Comparing UDP with TCP

Aspect UDP TCP
Connection None: datagrams are sent straight away Set up with a three-way handshake first
Delivery guarantee None: packets can be lost or reordered Guaranteed: lost packets are resent in order
Speed and overhead Very fast, with an eight-byte header Slower, with handshakes and acknowledgements
Flow control None: the sender never slows down Built in: the sender adapts to the receiver
Best for Live video, voice, gaming, DNS Web pages, email, file downloads

Where UDP is used

DNS is the most familiar example, and the one that touches almost everything you do online. Every time you type a web address, your device sends a short UDP query to a DNS server and waits for a short answer. If the answer never arrives, the query is simply sent again.

Live video and voice calls are the classic case for UDP. In a video call, each frame of picture and each slice of sound is a packet, and the stream must keep moving at a steady rate. Waiting to resend a lost packet would delay everything behind it, producing the stuttering and lag that make a call unusable.

Online games depend on UDP for the same reason. A game must know where every player is right now, dozens of times a second, and an update that arrives half a second late is worse than no update at all, because the game has already moved on.

UDP also carries the background machinery of the internet. Network time synchronisation, which keeps clocks accurate across the world, runs over UDP, as do many monitoring and logging systems that send small status messages from thousands of machines.

Strengths and limits

The greatest strength of UDP is its speed, and that speed comes directly from everything it refuses to do. With no handshake, no acknowledgements, and no retransmissions, a datagram can leave the sender the moment the application has it ready. For real-time traffic, that difference is the difference between a conversation and a series of interruptions, and no amount of careful engineering can give TCP the same immediacy.

It is also simple and light, which matters for devices that have little processing power or battery to spare. A tiny sensor, a router, or a game console can implement UDP in a fraction of the code and effort that TCP demands, and the eight-byte header leaves more room in each packet for actual data.

Its limits are the mirror image of its strengths. UDP cannot promise delivery, order, or protection against duplication, so any application that needs those things must build them itself, on top of UDP, which is real work and a real source of bugs. A file transferred over raw UDP would arrive with pieces missing and no way to know which, which is why nobody transfers files that way.

UDP is also easier to abuse than TCP, because there is no handshake to verify who the sender really is. Forged source addresses are simpler to fake, which is why UDP is a common ingredient in certain kinds of denial-of-service attack, where spoofed requests trick servers into flooding a victim with replies.

UDP checklist

  • Use UDP when a late packet is worse than a lost one, such as live audio or video.
  • Use TCP instead when every byte must arrive, in order, such as files or web pages.
  • Keep UDP messages small, so each one fits in a single datagram.
  • Expect packets to be lost or reordered, and design the application to cope.
  • Build your own retransmission or sequencing only where the application truly needs it.
  • Remember the checksum catches accidents, not attacks, so add real security separately.
  • Use DNS over UDP for quick lookups, and expect the occasional retry.
  • Test under real network conditions, including congestion and packet loss.
  • Monitor UDP traffic for abuse, since spoofed sources are easier to fake.

Frequently asked questions

What is UDP?

UDP, the User Datagram Protocol, is a transport protocol that sends data across the internet in independent packets called datagrams, with no connection, no delivery guarantee, and very little overhead. It is designed for speed, and it leaves reliability to the application.

What is the difference between UDP and TCP?

TCP sets up a connection, guarantees delivery in order, and resends anything that is lost, at the cost of speed and overhead. UDP sends datagrams immediately with no guarantee, which makes it faster but means packets can be lost, duplicated, or arrive out of order.

Why is UDP used for DNS?

A DNS lookup is a single short question with a single short answer, so setting up a TCP connection would cost more time than the lookup itself. If a UDP query is lost, the client simply sends it again, which is cheap and fast enough that the lack of a guarantee does not matter.

Is UDP unreliable?

Yes, in the technical sense: UDP does not guarantee that a datagram will arrive, arrive once, or arrive in order. That is a deliberate design choice rather than a flaw, and applications that need reliability either accept the loss, as video calls do, or build their own checks on top.

Is UDP faster than TCP?

Yes, for the first packet at least, because UDP has no handshake and no waiting for acknowledgements.

Can UDP be used for streaming?

Yes, and it is the usual choice for live streaming, video calls, and online games, where a steady flow matters more than a perfect one. On-demand streaming often uses TCP instead, because a brief pause to refill a buffer is acceptable when every part of the video must arrive intact.

The bottom line

UDP explained in one line is this: a fast, minimal protocol that sends data as independent datagrams, with no connection and no promise of delivery, and trusts the application to deal with whatever is lost along the way.

Use it where the moment matters more than the message, live media, games, and quick lookups, and leave the careful, guaranteed deliveries to TCP.

This article is general information about how UDP works, not advice about which technology suits a particular project.

Latest articles

Scroll to Top