Coinjoin and Transaction Mixing: How Bitcoin Privacy Really Works
Bitcoin is pseudonymous, not anonymous — every transaction is traceable on a public blockchain. Coinjoin and transaction mixing are the main techniques used to break that chain of traceability. This guide covers how they work and what their limitations are in practice.
On this page
Coinjoin and Transaction Mixing: How Bitcoin Privacy Actually Works
Bitcoin gets called anonymous a lot, but that's not quite right. It's pseudonymous. Every transaction is permanently etched into a public blockchain, so anyone who connects your wallet address to your real identity can trace your entire financial history — every payment, every balance. Coinjoin and transaction mixing exist to break that chain. Here's how they actually work, where they fall short, and how they fit into a real privacy strategy.
What Is Coinjoin?
Coinjoin combines multiple Bitcoin transactions from different users into a single transaction. The goal is to make it genuinely hard for an outside observer to figure out which input funded which output.
Bitcoin developer Gregory Maxwell proposed the idea in 2013. The insight behind it is pretty elegant: Bitcoin's protocol already allows a transaction to carry multiple inputs and multiple outputs. So if several users coordinate to build one joint transaction where everyone sends equal amounts to new addresses, the link between sender and recipient becomes unclear.
How a Basic Coinjoin Works
Say Alice, Bob, and Carol each want to send 0.1 BTC to separate recipients. Here's what happens.
Each user provides an input — their unspent transaction output — and a destination address. A coordinator (or a peer-to-peer protocol) assembles a single transaction with three inputs and three outputs, all equal at 0.1 BTC. Each user signs only their own input before the transaction goes out. What an outside observer sees is three inputs and three outputs of identical value, with no way to match them up.
That equal output amount isn't an aesthetic choice. It's essential. If outputs differ in size, statistical analysis can often re-link them to specific inputs and the whole exercise falls apart.
Implementations in Practice
Three tools see the most real-world use today.
Wasabi Wallet runs a centralized coordinator with the ZeroLink protocol, enforcing equal outputs and using blind signatures so the coordinator itself can't link inputs to outputs. JoinMarket takes a different approach — it's a decentralized marketplace where "makers" offer liquidity for coinjoins in exchange for small fees, and "takers" initiate the mixing. Whirlpool, used in Samourai Wallet, runs a pool-based system with fixed denominations of 0.001, 0.01, 0.05, and 0.5 BTC.
Running a basic Whirlpool mix via CLI looks like this:
# Start Whirlpool CLI with your wallet
java -jar whirlpool-client-cli.jar \
--server=pool.whirlpool.io \
--wallet=wallet.json \
--mix-pool=0.01btc
# Check mix status
whirlpool-cli status
# Start mixing a specific UTXO
whirlpool-cli mix --utxo=<txid>:<vout>
Transaction Mixing vs. Coinjoin
People use these terms interchangeably, but they describe meaningfully different models.
| Feature | Coinjoin | Custodial Mixer |
|---|---|---|
| Custody of funds | User retains custody | Mixer holds funds temporarily |
| Trust required | Minimal (coordinator cannot steal) | High (mixer can abscond) |
| Traceability risk | Coordinator knows input-output links (unless blinded) | Mixer operator knows everything |
| Legal gray area | Generally viewed as a protocol feature | Often treated as money transmission |
| Examples | Wasabi, JoinMarket, Whirlpool | Helix (now defunct), various centralized services |
Custodial mixers work by having you send funds to a third party who returns different coins minus a fee. The mixer operator sees the full mapping between your input and output, which makes them a single point of failure for both security and privacy. Several custodial mixers have been shut down by law enforcement for exactly this reason — they kept logs.
Coinjoin protocols are non-custodial. The worst a malicious coordinator can do is refuse to participate. They can't steal your funds, and in blinded implementations, they can't link your input to your output either.
Threat Models: What Mixing Actually Protects Against
Before you rely on Coinjoin, you need to understand what it actually defends against — and what it doesn't touch.
What It Addresses
Blockchain analytics firms like Chainalysis and Elliptic use heuristics such as common-input ownership and change address detection to cluster wallets. Coinjoin directly disrupts those heuristics. If you withdraw from an exchange to a fresh address and immediately coinjoin, you sever the direct link between your exchange identity and your on-chain activity. Passive surveillance — anyone just watching the blockchain — can't easily follow funds through a well-executed coinjoin with multiple rounds.
What It Doesn't Address
Network-level surveillance is a different problem entirely. If your Bitcoin node or wallet connects over clearnet, your IP address can be associated with a transaction before mixing ever happens. Running Bitcoin over Tor or I2P addresses this — I2P's garlic routing offers stronger anonymity for persistent connections than Tor's onion routing in some threat models.
Post-mix behavior is where a lot of people undo their own work. Sending mixed coins directly to a KYC exchange, or combining them with unmixed UTXOs in a consolidation transaction, erases the privacy you just spent time building. Timing attacks, transaction graph analysis across multiple rounds, and dust attacks can also reduce your anonymity set if you're not careful. And just like browser fingerprinting can identify you through consistent behavioral patterns, on-chain fingerprinting works the same way — your fee choices, transaction timing, and spending patterns can identify you even through a mix.
Anonymity Sets and Why Size Matters
The anonymity set is the number of users whose outputs are indistinguishable from yours after a mix. If 10 people coinjoin equal amounts, your output is one of 10 possible recipients for any given input. That's an anonymity set of 10.
More rounds improve this significantly. After two rounds of 10-person coinjoins, a passive observer can't distinguish your output from 100 possible origins. Whirlpool tracks this with a "forward-looking anonymity score" that increments each time a UTXO participates in a new mix.
The practical ceiling here is liquidity. Larger pools need more participants, which means longer wait times. JoinMarket solves this with an always-available market of makers, but you pay fees as a taker for that convenience.
Operational Security Around Mixing
The technical implementation only works if your habits support it. A few practices matter a lot.
Wallet separation. Use dedicated wallets for mixed and unmixed funds. Don't import mixed UTXOs back into a wallet that holds KYC-tainted coins — that single step can unravel everything.
Fee management. Coinjoin transactions can have unusual fee structures. Paying fees from the mixed UTXO itself can slightly alter output amounts and shrink your anonymity set. Some implementations handle this by paying coordinator fees from a separate UTXO.
Communication security. Coordinating with other participants or managing a JoinMarket setup should happen over encrypted channels. Signal and SimpleX offer meaningfully different trust models, and that distinction matters when you're coordinating sensitive transactions.
Timing discipline. Don't mix immediately after a large withdrawal from a named exchange if timing correlation is a concern. Introduce delays.
Node operation. Running your own full node keeps you from leaking wallet data to third-party servers. Pair it with Tor:
# In bitcoin.conf
proxy=127.0.0.1:9050
listen=1
bind=127.0.0.1
onlynet=onion
Legal and Ethical Considerations
Coinjoin is a protocol-level feature of Bitcoin. It's not inherently illegal. That said, FinCEN and equivalent bodies in other jurisdictions have brought actions against custodial mixing services under money transmission laws, so the line between the technology and how it's deployed matters legally.
Non-custodial coinjoin is legally distinct because no third party ever takes control of your funds. The 2023 arrest of Samourai Wallet developers on money transmission charges added real uncertainty to the space, though the charges specifically targeted the custodial coordination service model rather than the cryptographic technique itself.
Using Coinjoin to evade taxes or launder criminal proceeds is illegal, full stop. Using it to maintain financial privacy for legitimate reasons is, in most jurisdictions, not categorically prohibited — though the regulatory picture keeps shifting and you should stay current on your local laws.
Summary and Key Takeaways
“Arguing that you don't care about the right to privacy because you have nothing to hide is no different from saying you don't care about free speech because you have nothing to say.”
— Edward Snowden
Coinjoin and transaction mixing are practical tools for improving on-chain Bitcoin privacy. They work by making your transactions harder to trace through the blockchain, but they're not magic. Technical measures only get you so far if your operational habits undermine them. Know your threat model, use non-custodial tools, keep your mixed and unmixed funds separate, and run your own node over Tor. Privacy is a practice, not a single transaction.
Frequently Asked Questions
What is CoinJoin and how does it improve my privacy?
CoinJoin is a method where multiple Bitcoin users combine their transactions into a single transaction, making it harder for outside observers to trace which input belongs to which output. It works by pooling funds from several participants so the source and destination of each payment becomes obscured. This improves privacy without requiring any changes to the Bitcoin protocol itself.
Is using CoinJoin or transaction mixing illegal?
In most countries, using CoinJoin is not illegal — it is simply a privacy technique, similar to using a VPN or encrypted messaging. However, some exchanges may flag or reject funds that have gone through mixing services, and regulations vary by jurisdiction. It is always worth checking the rules in your country and being aware of the compliance policies of any exchange you use.
Does CoinJoin make my Bitcoin completely anonymous?
CoinJoin significantly increases privacy but does not guarantee complete anonymity. Factors like the number of participants in a join, how you handle the mixed coins afterward, and metadata from your wallet or network connection can still reveal information. For stronger privacy, users often combine CoinJoin with other practices like using Tor and avoiding address reuse.
Video Resources
Sources & Further Reading
- Tor Project — Official site of the Tor network and Tor Browser.
- Tor Browser Manual — Setup, security levels, bridges and troubleshooting.
- EFF Surveillance Self-Defense — Threat-model based guides from the Electronic Frontier Foundation.
- Privacy Guides — Independent recommendations for privacy-respecting tools.
- Security in a Box — Digital security guides for activists and journalists.
- Tails Documentation — Official documentation for the amnesic live operating system.
- Whonix Documentation — Wiki for the Tor-based Whonix operating system.