What is a canary trap?
A canary trap gives each recipient a copy of a text that differs in small, deliberate ways. If one copy leaks, the differences show whose it was.
One simple scheme codes one space after a sentence as 0 and two spaces as 1. Elon Musk described this as a “binary signature” The Intercept (15 Dec 2022). Each extra sentence doubles the number of unique copies, so nine sentences give 512 The Intercept (15 Dec 2022).
How does this tool mark copies?
It finds every place in your text that can change without changing the meaning. Then it gives each recipient a random code with one choice per place:
- Sentence spacing: one or two spaces.
- Quotes and apostrophes: straight (") or curly (“ ”).
- Dashes: a hyphen with spaces or an en dash.
- Contractions: “do not” or “don’t”, “cannot” or “can’t”.
- Word swaps (optional): pairs like “toward” and “towards”, or “maybe” and “perhaps”.
- A hidden ID (optional): zero-width characters that name the copy.
Codes are picked so that any two copies differ in many places. The page tells you the smallest difference between any two copies.
How does matching a leak work?
The matcher finds each marked place in the leak by the words around it, so a partial copy still works. It reads which choice the leak shows. Then it counts, for every recipient, how many places agree with their copy.
A real source agrees almost everywhere. Other copies agree on about half, by chance. The table shows the chance that an innocent copy would fit as well.
If every place of one kind looks the same in the leak, an app or a retyping probably evened it out. The matcher then ignores that kind and says so.
Which marks survive?
- Copy and paste keeps everything, including hidden characters.
- Web pages show two spaces as one. Quotes, dashes and words survive.
- Retyping or a screenshot read by OCR loses spacing and often quote styles. Contractions and word swaps usually survive.
- Paraphrasing or merging several copies can defeat any canary trap.
Can other tools spot the copies?
We made 20 copies of a memo and ran them through out-of-character out-of-character on npm (read 29 Nov 2026), anti-trojan-source anti-trojan-source on npm (read 29 Nov 2026) and two zero-width decoders. None flagged a copy unless the hidden ID was on.
Our own hidden text detector flags mixed spacing, quotes and dashes in every copy. Copies that differ only in contractions passed unnoticed.
Evening out spacing, quotes and dashes did not hide the source: the contractions still pointed to the right copy. Spelling out contractions as well left too little to match.
How do leakers beat canary traps?
They compare two copies, retype the text, or summarise it. Our hidden text detector can even out spacing, quotes and dashes and spell out contractions. Word swaps need a rewrite. Musk also said Tesla traced a leaker this way, though press reports at the time described other methods The Intercept (15 Dec 2022).
Is it legal to use a canary trap?
Marking your own documents is generally lawful, but what you do with a result may not be. A match is evidence, not proof. Two people may have shared a copy. Take legal advice before acting on it.