Ages

Now you know how a VPN works!

What next?

Try it yourself ↓

How does a VPN work?

▶ 4:54 video · Watch on YouTube

  1. 0:00 Who can see your message?
  2. 0:31 The normal trip
  3. 1:33 Scrambling with a key
  4. 2:15 The tunnel
  5. 3:24 What a VPN can't do
  6. 4:04 The big picture

Your turn

Peek through each watcher's eyes

Send a secret letter!

Each lab is one step from the video. Flip the switches, send a message and tap a watcher to see what it can see.

Each lab isolates one idea. The addresses are documentation-only examples (203.0.113.x, 198.51.100.x) and the website is made up.

Tap the buttons and send a letter.

1

The padlock and the label

What HTTPS hides, and what it doesn’t

The lock on the letter

Switch HTTPS on and off, send a message, then peek. What can the café wifi still read with the padlock on?

HTTPS encrypts the contents. Which parts of the packet stay visible to the wifi and the ISP?

Turn the lock on and off. Send a letter. Tap a helper to peek.

2

Crack the code

A toy cipher: the shift code

Secret code

Pick a key to scramble the message. Then play the snoop: can you guess the key?

A shift cipher has only 25 useful keys, so a snoop can try them all. Real VPNs use keys like AES-256.

Slide the key. The words get mixed up! Can the snoop read them?

A toy model: real encryption uses far longer keys and much cleverer maths than a letter shift.

3

Switch on the VPN

Encapsulation, on and off

The secret tunnel

Flip the VPN on and off, send a message, and peek. Who can see the real website? Who sees your address?

With the tunnel on, compare the outer header the ISP sees with the source address the website logs.

Turn the tunnel on and off. Send a letter. Who can peek now?

4

True or false?

Myths about VPNs

True or false?

Tap each card to flip it. Which things can a VPN really do?

Flip each claim. Where does the trust go, and what does a VPN not protect against?

Tap a card to flip it.

5

Mix it up

The full model

Play post office

Mix HTTPS and the VPN, send a message, and tap each watcher. Which mix hides the most?

All four observers, both switches. Note what only HTTPS protects after the VPN server.

Turn things on and off. Send a letter and peek!

What is a VPN?

When you send a message on a computer, it goes on a trip, like a letter in the post. Helpers pass it along the way.

The helpers can peek

The café wifi and the internet company pass your letter along. A little lock keeps the inside secret. But they can still read some of the outside, and can usually tell where it is going.

A secret tunnel

A VPN puts your letter into a secret code, then into a new sealed envelope. It goes through a secret tunnel. The helpers can't see where it is really going!

The tunnel helper

At the end of the tunnel, a helper opens the envelope and sends your letter on. That helper can see where your letter is going, so it must be one you trust. A VPN can't stop tricks or viruses, and it doesn't make you invisible.

Grown-ups set this up. A VPN is something a grown-up chooses and sets up. Always ask a grown-up before you change anything on a computer or phone.
Did you know? Companies have long used VPNs so people working from home can still use their office's computers safely.

← More explainers

How does a VPN work? The short answer

A VPN (virtual private network) uses an app on your device that works together with a VPN server somewhere else on the internet. Before your data leaves your device, the app encrypts (scrambles) it and wraps it in a new envelope addressed to the VPN server. This is the encrypted tunnel.110

The wifi you're on and your internet provider only see scrambled data heading to the VPN server. They can't read it or tell which website it's really for.9 The VPN server takes off the VPN wrapping, then sends it on to the website (with HTTPS, the contents stay locked). The website sees the VPN server's IP address, not yours, so to the website you appear to be wherever that server is.16

There's a catch: the VPN company can now see everything the tunnel hid from the others. You haven't got rid of a watcher. You've swapped one for another.12

The normal trip: who sees what without a VPN?

When you open a website, your device doesn't talk to it directly. Your message goes from your device to the local network (for example a café's wifi router), then to your internet service provider (ISP), the company that connects you to the internet, and then across the internet to the website's server.9 For how that trip works in detail, see how the internet works and how wifi works.

Every piece of data carries a label with two addresses: where it's going, and where it came from. The "from" address is your IP address. It works like a home address for your device: it's how answers find their way back to you, and it gives a rough idea of where you are.111 Your ISP and other networks along the way can keep logs of which sites you visit.9 A 2021 report by the US Federal Trade Commission found that many ISPs collect and share more data about their customers than people expect.13

Doesn't HTTPS already protect me?

Mostly, yes, for the contents. Today most websites use HTTPS, the version of the web with the padlock in the address bar. HTTPS encrypts what you send and receive, so people on the same wifi can't read your messages or passwords. That's why the FTC now says public wifi is usually safe to use.38

But HTTPS leaves the label readable. Anyone along the path, including the wifi owner and your ISP, can usually still see which websites you visit (like wikipedia.org) and when, and how much data you download. They can't see which pages you read on that site, your login or your messages.1 A VPN hides the label too, from everyone between you and the VPN server.

WhoPlain web (no padlock)HTTPS, no VPNHTTPS + VPN
Café wifi / local networkSite + contentsWhich site, whenOnly "scrambled data to a VPN server"
Your ISPSite + contentsWhich site, whenOnly "scrambled data to a VPN server"
VPN company(not in the path)(not in the path)Which site, when, and your real IP address
The websiteYour IP addressYour IP addressThe VPN server's IP address

Based on EFF, Cloudflare and FTC guidance.193 (Anything you log in to, and any cookies, still tell the website who you are.)

What is encryption? Scrambling with a key

Encryption is the mathematical process of making a message unreadable to everyone except someone who has the key. Undoing it is called decryption.710

In the player we use a toy version: shift every letter along the alphabet by a secret number. With key 3, MEET becomes PHHW. Someone with the key shifts the letters back; someone without it sees nonsense. A toy code like this is easy to crack by trying all 25 keys. Real VPNs use strong modern encryption with enormously long keys, for example a 256-bit key for the AES cipher, which has about 1077 possible values, far too many to try one by one.6

What is a VPN tunnel?

Networks send data in small chunks called packets, each with a label (header) and contents (payload). A tunnel works by encapsulation: the whole original packet, label and all, is put inside the contents of a new, outer packet. It's a packet inside a packet.10

In a VPN, the inner packet is encrypted, and the outer packet is addressed to the VPN server. Routers along the way only read the outer label, so the data crosses the ordinary internet while nobody outside can see in. That's why a VPN is called virtual (it's built in software on top of the public internet) and private (outsiders can't read what's inside).414 The rules for building the tunnel are called VPN protocols. Well-known ones include IPsec and OpenVPN.106

  1. You turn on the VPN app and it connects to a VPN server.
  2. The app encrypts each packet you send and wraps it in a packet addressed to the VPN server.
  3. The wifi and your ISP pass it along, seeing only scrambled data going to the VPN.
  4. The VPN server unwraps and decrypts it, and sends it to the website with its own IP address as the return address.
  5. The website's answer goes back to the VPN server, which encrypts it and sends it back through the tunnel to you.

The tunnel stops at the VPN server. From there to the website, your data is protected only if the website uses HTTPS.9

What does a VPN do, and what is it used for?

Working from home. Companies and universities were using VPNs long before VPN apps were sold to the public. A work VPN lets staff connect to the organisation's private network from home or on the road as if they were in the building.62 For example, the University of Washington's VPN gives your device a university IP address so the campus network treats it as one of its own.12

Wifi you don't trust. On an open network where you don't know who runs it, a trustworthy VPN hides which sites you use from the network owner and anyone snooping on it.15

More private browsing. A VPN hides your browsing from your ISP and stops websites from seeing your real IP address. But the VPN company can see it instead.16

Because a VPN makes you appear to be somewhere else, it can change what a website shows you. Using it to get around a service's rules can break that service's terms, and many services block known VPN addresses.6 Schools, families and workplaces also set their own rules about VPNs on their networks and devices.

What a VPN can't do

  • It doesn't make you anonymous. If you log in, a site knows it's you. Cookies, tracking pixels, GPS and browser fingerprinting still work.16
  • It doesn't remove trust, it moves it. Everything hidden from your ISP is visible to the VPN provider. The FTC points out that installing a VPN app gives it permission to intercept all your internet traffic. Researchers who studied almost 300 VPN apps found some didn't encrypt at all, and some shared data with third parties.21
  • It doesn't stop viruses, scams or fake websites. Ads often oversell VPNs as protection against everything. They aren't.115
  • It can slow things down. Your data makes an extra stop, and a far-away or overloaded server adds delay.9

Common misconceptions

✗ "With a VPN I'm invisible online." Reality: it changes who can see your traffic, not whether anyone can. The VPN company sees it, and logins and cookies still identify you.1

✗ "Without a VPN, anyone on café wifi can read everything I do." Reality: mostly outdated. HTTPS already encrypts the contents on most sites; what leaks is which sites you visit.38

✗ "A VPN encrypts everything all the way to the website." Reality: only as far as the VPN server. After that, HTTPS does the protecting.9

✗ "A VPN is antivirus." Reality: it won't stop malware, scams or phishing.1

✗ "VPNs were invented for privacy apps." Reality: businesses used them first, so staff could reach the office network remotely.6

FAQ

Did this help it click?

Sources

  1. EFF Surveillance Self-Defense, Choosing the VPN That's Right for You
  2. US Federal Trade Commission, In the market for a VPN app? (2018)
  3. FTC Consumer Advice, Are Public Wi-Fi Networks Safe? What You Need To Know
  4. NIST Computer Security Resource Center, Glossary: virtual private network
  5. CISA, Securing Wireless Networks
  6. Center for Democracy & Technology, Techsplanations Part 5: Virtual Private Networks
  7. EFF Surveillance Self-Defense, What Should I Know About Encryption?
  8. EFF, Why Public Wi-Fi is a Lot Safer Than You Think (2020)
  9. Cloudflare Learning Center, What is a VPN?
  10. Cloudflare Learning Center, What is tunneling?
  11. Cloudflare Learning Center, What is my IP address?
  12. University of Washington IT Connect, Husky OnNet (UW VPN)
  13. FTC, Staff report on internet service providers' data practices (2021)
  14. Britannica, virtual private network
  15. EFF, A Wider View on TunnelVision and VPN Advice (2024)