Skip to the explanation
Online
Choose language, current: English

How does a text message reach your friend?

You type “you in?” and hit send. In less than a second, it shows up on a phone on the other side of town, or even on the other side of the world. But sometimes it gets stuck at one gray check mark. So where is your message hanging out?

The short answer

Your phone turns your message into zeros and ones and sends them as radio waves to a cell tower or your Wi-Fi router. Through cables made of glass, it travels to a server belonging to the app. The server stores your message and passes it on as soon as your friend's phone can be reached. Along the way, it's locked.

About 5 minutes to read, plus two things to try yourself.

1. From letters to zeros and ones

A phone is a small computer. And a computer doesn't know any letters. It only works with two states, like a light that's on or off. You write those two states as 1 and 0. A single 1 or 0 is called a bit. Eight bits together are called a byte.

Every letter has a fixed code of zeros and ones. There are worldwide agreements about this, so every phone uses the same code. The agreement that's used almost everywhere is called UTF-8. In it, the letter y is 01111001 and the o is 01101111. An ordinary letter fits in one byte. A letter with an accent, like é, takes two bytes. An emoji usually takes four. The agreement contains over 150,000 characters from all languages, and emoji are at the end of that list, where the codes are longer.

So to your phone, your message “you in?” is a row of 56 zeros and ones: 7 characters of 8 bits each. The space and the question mark count too. A photo or a voice message also becomes zeros and ones, but then the row is much longer.

2. Through the air to the cell tower

Your phone sends the zeros and ones into the air as radio waves. Those are invisible waves, related to light. The phone keeps changing the wave a tiny bit, and each small change stands for a few zeros and ones.

If you're at home, the waves go to your Wi-Fi router: the little box that connects your home to the internet. If you're not on Wi-Fi, for example outside, they go to a cell tower. That's a tall pole, or a spot on a high roof, full of antennas. An antenna is a piece of metal that sends out and picks up radio waves.

At the cell tower or the router, the trip through the air ends. From there, your message continues through a cable.

3. In packets through optical fiber

The internet is a worldwide network of cables and computers that are connected to each other. The fastest cables are made of optical fiber: threads of glass, as thin as a hair. Your message travels through them as tiny flashes of light. Light on is a 1, light off is a 0. In reality it's a bit more complicated, but this way you get the idea.

A big message, like a photo, gets cut into pieces: packets. Each packet has an address on it, saying where it needs to go, and a sequence number. A short text often fits in one packet. A photo needs hundreds or thousands.

Along the way, a packet passes routers. Those are computers at every intersection of the internet that check which way it needs to go, like a road sign. Your Wi-Fi router at home is a road sign like that too, just a small one. Usually the packets take the same route, but they don't have to: every router sends each packet on separately. That's why they sometimes arrive in a different order. Thanks to the sequence numbers, the receiver puts them back in order. If one is missing, it gets sent again.

Try it yourself: you're sending a photo. It gets cut into six numbered packets. Press Send the photo and see what order they arrive in. Then put them in order.

A photo in six numbered packets On the left is your photo, cut into six squares numbered 1 to 6. In the middle are routers, with three different routes between them. On the right are six empty spots at your friend's end. The packets each take their own route and arrive in a different order. Using the numbers, they get put back in the right place. your photo your friend routers 1 2 3 4 5 6

Your photo is ready, cut into six numbered packets.

A simplified model. A real photo gets cut into hundreds to thousands of packets, and there are many more routers in between. Usually the packets arrive neatly in order. But not always, and that's why every packet has a number on it.

With JavaScript turned on, you can send a photo yourself here. The six packets each take their own route past the routers and arrive in a different order, for example 3, 1, 5, 2, 6 and 4. At your friend's end, the photo is a jumble at first. Thanks to the numbers, their phone puts the pieces back in the right place.

4. The server is a post office

Your message doesn't go straight to your friend's phone. First it goes to one of the app's servers. A server is a computer that's on day and night and does work for other devices. The servers of an app like WhatsApp are in data centers: huge buildings full of computers.

The server works like a post office. It accepts your message and looks for your friend's phone. If that phone can be reached, the server passes it on right away. If the phone is off or has no signal, the server stores your message and tries again later. WhatsApp stores a message like that for up to 30 days. Once it's delivered, the server deletes it.

The check marks show you exactly where your message is. This is how it works in WhatsApp:

  • A little clock: your message is still on your own phone, for example because it has no connection. Your phone sends it automatically as soon as it can.
  • One gray check mark: your message has reached the server.
  • Two gray check marks: your message is on your friend's phone. That phone has sent a short message back saying it arrived: a delivery receipt.
  • Two blue check marks: your friend has read it. If they've turned off read receipts, the check marks stay gray.

Other apps work the same way, but the symbols look different.

Experiment: make a single check mark yourself. Do this together with an adult and a friend or family member who has their own phone. Ask the other person to turn on airplane mode and to check that Wi-Fi is off too: then the phone can't connect anymore. Now send them a message. How many check marks do you see? Then have them turn airplane mode off again and watch what happens to the check marks.

Careful: turn airplane mode off again right after the experiment. Otherwise the other person can't be reached, not even in an emergency.

Try it yourself: your friend's phone is off. Press Send and see where your message ends up and how many check marks you see. Then turn their phone on, and let them read your message.

The journey of a message On the left is your phone, on the right your friend's phone. In between are two cell towers, with a yellow server in the middle. From your phone to the cell tower, the message travels through the air. From the cell tower to the server and beyond, it goes through an optical fiber cable. The purple envelope is your message. If your friend's phone is off, the envelope stays at the server. optical fiber optical fiber cell tower cell tower server stores your message you off your friend

Your screen

you in?

Your friend's phone

A simplified model. In reality, your message passes many more routers and cables, and the whole trip usually takes less than a second. If your friend is at home on Wi-Fi, the last part doesn't go through a cell tower but through their Wi-Fi router. When your friend reads your message, the check marks turn blue.

With JavaScript turned on, you can send a message yourself here. Your message travels as radio waves to the cell tower, and through optical fiber to the server. There you see one gray check mark. If your friend's phone is off, your message stays at the server. When your friend's phone turns on, the server passes it on. Your friend's phone sends a delivery receipt back, and you see two gray check marks. When they read it, the check marks turn blue.

5. Locked along the way

Along the way, your message passes lots and lots of computers. So can anyone else read it? No, because it's locked. That's called encryption. Your phone scrambles the zeros and ones using a secret number: the key. Without that key, your message is an unreadable mess.

In WhatsApp and Signal, your message is locked from start to finish. That's called end-to-end encryption: from one end to the other. Your phone locks it, and only your friend's phone can unlock it. Not even the server can read your message. The WhatsApp server does see who it's from, who it's for and when. Just like a mail carrier, who sees the envelope but not the letter.

Your message first goes to a server that holds on to it until your friend's phone can be reached. That's why you first see one check mark, and only later two.

Did you know?

The internet lies on the seafloor

Almost all internet traffic between continents doesn't go via satellites, but through cables on the bottom of the sea. There are hundreds of them, more than a million kilometers long in total. So if you send a message from the Netherlands to someone in America, it simply goes under the ocean.

More than a million messages per second

According to WhatsApp, its users were already sending about 100 billion messages a day in 2020. That's more than a million per second. Every one of those messages passes through a server.

Want to know more?

How fast does your message get to Australia?

Light travels more slowly in glass than in air: about 200,000 kilometers per second. In big numbers, you put a comma after every three digits, counting from the right: this is two hundred thousand. In a straight line, Sydney in Australia is about 16,600 kilometers from Amsterdam. How long does a flash of light take to get there?

time = distance ÷ speed

The sign ÷ means divided by.

16,600 km ÷ 200,000 km/s ≈ 0.083 s

The sign ≈ means about, and km/s means kilometers per second. 0.083 seconds is 83 milliseconds: 83 thousandths of a second. Blinking your eyes once takes longer.

In reality, it takes longer. A cable doesn't run in a straight line, but around countries and continents, so it's much longer than 16,600 kilometers. And every packet passes dozens of routers, which each add a little bit of time. Because of that, a packet from Amsterdam to Sydney takes more like 0.12 seconds. Your message also passes through the app's server. Still, it usually gets to the other side in well under a second.

Agreements: TCP/IP

All computers on the internet follow the same agreements, so they understand each other. A set of agreements like that is called a protocol. Together, the two most important ones are called TCP/IP.

IP, the Internet Protocol, is about the address. Every device on the internet has an IP address, like a house number. Every packet has the address of the sender and of the receiver on it. A router only looks at the address of the receiver.

TCP is about the order and the checking. TCP numbers everything you send, puts it back in order at the end and asks for missing packets to be sent again. In reality, TCP counts the bytes instead of the packets, but the idea is the same.

How big is a packet?

A packet on the internet is usually at most about 1,500 bytes. That largest size is called the MTU, short for maximum transmission unit. A byte is 8 bits, so about 12,000 zeros and ones fit in one packet. A 2-megabyte photo is 2,000,000 bytes. Mega means million.

2,000,000 bytes ÷ 1,500 bytes ≈ 1,333 packets

Every packet also carries the address and the number. Because of that, a bit less of the photo fits in, and in reality it takes a few more packets.

Two keys: a padlock and a key

End-to-end encryption works with two keys that belong together. A key here isn't a thing made of metal, but a very long number.

Anyone can have the public key. Think of it as an open padlock. Your friend's phone leaves open padlocks like that at the server, and anyone can take one. The private key always stays on your friend's phone. Only that key can open the padlock again.

Your phone snaps one of your friend's padlocks onto your message. After that, nobody can open it anymore: not you, not the server. Only your friend, with their private key.

WhatsApp and Signal use the Signal Protocol for this. In reality, it works even more cleverly. The two phones use their keys to agree on a secret key together, and that key changes with every message. If someone does find out one key, they still can't use it to read all your other messages.

Think further

Why does your message go through a server? Couldn't it just go straight from your phone to your friend's?

Give me a hint

Think about what happens if your friend's phone is off. And does your phone actually know where your friend's phone is at that moment?

See a possible answer

There isn't just one right answer. A phone isn't always on and doesn't always have a signal. Without a server, your phone would have to keep trying until your friend's phone can be reached again, and that drains the battery. On top of that, a phone's address keeps changing when it switches from Wi-Fi to a cell tower. The server is a fixed point that's always on and knows how to reach every phone. For a group chat, your phone only has to send the message once. There are ways to send something directly, like via Bluetooth, but then the other person has to be close by.

You send a message in a group chat with thirty people. When would you see two gray check marks? And when blue ones?

Give me a hint

The server has to deliver the message thirty times, and every phone sends back its own delivery receipt.

See a possible answer

You could go either way: two check marks as soon as one person has it, or only once everyone has it. WhatsApp picks the second option: you only see two gray check marks when your message is on every phone in the group, and blue ones only when everyone has read it. So if one phone is off, it stays at one check mark. If you want to know who already has it, you can look that up for each message.

Words you now know

Bit
A 1 or a 0: the smallest piece of information in a computer.
Byte
Eight bits together. An ordinary letter fits in one byte.
Code
An agreement about which row of zeros and ones goes with which letter or symbol.
UTF-8
The agreement that almost all devices use to turn letters and emoji into zeros and ones.
Radio wave
An invisible wave, related to light, that carries messages through the air.
Antenna
A piece of metal that a device uses to send out and pick up radio waves.
Cell tower
A tall pole or a spot on a high roof full of antennas, which picks up and sends out the radio waves of phones.
Wi-Fi router
The little box that connects the devices in your home to the internet.
Internet
A worldwide network of cables and computers that are connected to each other.
Optical fiber
A thread of glass, as thin as a hair, that messages travel through as tiny flashes of light.
Packet
A piece of a message, with an address and a sequence number on it.
Router
A computer at every intersection of the internet that checks which way a packet needs to go.
Server
A computer that's on day and night and does work for other devices, like storing and passing on messages.
Data center
A huge building full of servers.
Delivery receipt
A short message back saying that your message has arrived.
Read receipt
A short message back saying that your message has been read.
Airplane mode
A setting in which your phone doesn't connect to cell towers.
Encryption
Scrambling a message so thoroughly that you can't read it without a key.
End-to-end encryption
Encryption where only the sender and the receiver can read the message, not even the server.
Key
A very long number that you use to lock or unlock a message.
Public key and private key
Two keys that belong together. Anyone can have the public key, the private key stays secret.
Speed of light
How fast light travels: almost 300,000 kilometers per second in air, and about 200,000 in glass.
Millisecond
A thousandth of a second.
Protocol
A set of agreements that lets computers understand each other.
TCP/IP
The most important agreements of the internet. IP takes care of the address, TCP of the order and the checking.
IP address
The address of a device on the internet, like a house number.
MTU
The largest size of a packet, usually about 1,500 bytes.
Megabyte
A million bytes.

Test yourself

What does one gray check mark mean in WhatsApp?

See the answer

Your message has reached the server.

How does your message get from your phone to the cell tower?

See the answer

As radio waves through the air.

Why can't the WhatsApp server read your message?

See the answer

Because only your friend's phone has the key to unlock it.

Tricky question: you text your friend at 10:00 p.m. Their phone is off and turns back on at 7:00 the next morning. They don't read your message until 8:00 a.m. What do you see at 10:01 p.m. and at 7:01 a.m.?

See the answer

At 10:01 p.m. one gray check mark, at 7:01 a.m. two gray check marks.

Explore more