Glossary

Onion routing

Onion routing is the technique Tor is built on.

By Abdul Hannan · Published 14 November 2026 · Updated 14 November 2026

What it means

Onion routing is the technique Tor is built on. Your message is wrapped in layers of encryption — like the layers of an onion — and each relay in the circuit peels off one layer. The first relay removes the outermost layer and learns only where to send the message next; the last relay removes the final layer and delivers the message. No relay ever sees the whole journey, and no relay knows both the sender and the destination.

How it works

Before a message leaves your computer, your Tor software chooses a route of three relays and encrypts the message once for each relay, innermost first. Each relay holds a key for its own layer only. When a relay receives the message it decrypts its layer, reads the address of the next relay, and forwards the still-encrypted remainder. The route is chosen in advance by your software, not by the relays as the message travels. Onion services — the sites with .onion addresses — use the same idea in reverse: your connection and the service meet inside the network, so neither side learns the other's address.

Example

Think of a letter inside three sealed envelopes, each addressed to the next courier. The first courier opens the outer envelope, finds the address of the second courier, and passes the letter on — still inside two envelopes. The second courier opens the next envelope and passes it on. The third courier opens the last envelope and delivers the letter. No courier knows both who sent the letter and who received it; each one knows only the step before and the step after.

Common misunderstandings

People sometimes describe onion routing as encrypting the message three times for extra strength, as if more layers meant a stronger lock. That misses the point: the layers are not about strength but about separation. Each layer exists so that one relay learns one thing only. A single strong layer known to one party would not achieve the same result at all.

Related terms

Learn more

Last checked: 14 November 2026.

Frequently asked questions

Who invented onion routing?

Onion routing was developed in the 1990s at the US Naval Research Laboratory, and the Tor Project later built the Tor network on the idea. It began as a research project in privacy technology, not as a commercial product.

Is onion routing the same as Tor?

No. Onion routing is the technique; Tor is the network built on that technique, and Tor Browser is the browser that uses the network. Other systems have used onion routing ideas too, but Tor is the one most people meet.

Does onion routing encrypt my message three times?

In a sense, yes — the message is wrapped in three layers, one per relay. But the purpose is separation, not triple strength: each relay can only remove its own layer, so each one learns only its own step.