Bitcoin's ledger records everything: every transaction, every input, every output, forever. What it does not record, at least not directly, is which addresses belong to which person. That gap is where CoinJoin lives. CoinJoin is a privacy technique that merges the Bitcoin spends of many unrelated users into a single, shared transaction so that an outside observer cannot reliably tell which input paid which output. No protocol changes are required, no coins are sent to a third party, and the result is an on-chain record that looks like one large, messy transaction instead of dozens of personal ones.
This guide explains what CoinJoin is, how a CoinJoin transaction is actually constructed, which implementations exist in 2026, what privacy you really gain, where the technique breaks down, and, critically, the legal situation after the prosecution of the Samourai Wallet founders. It is informational and not legal or financial advice.
What CoinJoin is, in plain terms
The idea was popularized by Bitcoin developer Gregory Maxwell in a 2013 email post. The logic is straightforward: blockchain analysts cluster addresses by assuming that all inputs in a transaction are controlled by the same entity, the "common input ownership heuristic." That assumption is usually right for an ordinary wallet transaction, which is why wallet-to-wallet spends are so easy to trace.
CoinJoin attacks the assumption itself. If inputs from several independent users are combined into one transaction, and every user receives an output of the same denomination, the analyst can no longer tell which input funded which output. Each participant still spends their own coins and receives their own payment, the transaction is cryptographically valid because Bitcoin allows many signers per transaction, but the ownership link between input and output is deliberately scrambled.
The crucial property is that CoinJoin is non-custodial. Coins never leave your wallet's control in a meaningful sense: you sign a transaction that spends your own UTXO to your own address, you just do it together with strangers. There is no mixer service holding your funds. That distinction matters enormously for both security and legality, though, as the Samourai case showed, it does not eliminate legal risk.
How a CoinJoin transaction works, step by step
A typical Chaumian-style CoinJoin, the design used by Wasabi and the former Samourai Whirlpool, follows this pattern:
- Registration. Each participant submits their input UTXO and a fresh destination address to a coordinator. To prevent the coordinator from learning which output belongs to which participant, the address is typically blinded or revealed through a separate channel (Whirlpool famously used Tor for this step).
- Transaction assembly. The coordinator builds a single transaction containing all participants' inputs, a set of equal-value "mix" outputs, and change outputs returning leftover funds. The coordinator cannot add outputs to itself or steal funds because every output must be signed by the participant whose input funds it, anyone can verify the assembly before signing.
- Verification. Each wallet checks that its own input is present, that the expected outputs exist at the right amounts, and that no malicious outputs were added. This is the safety property that makes CoinJoin trust-minimized: a dishonest coordinator can grief or censor, but cannot steal.
- Signing. Participants sign only for their own inputs. The coordinator gathers signatures and broadcasts the complete transaction.
- Result. The blockchain records one transaction with, say, 50 inputs and 50 identical outputs. An observer sees that each of the 50 outputs could have come from any of the 50 inputs, a so-called anonymity set of roughly 50, before considering the fees and other heuristics described below.
JoinMarket takes a different approach: instead of a fixed coordinator, there is a market. "Makers" lock up Bitcoin and advertise UTXOs for mixing in exchange for a fee; a "taker" initiates a CoinJoin, picks makers from an order book, and coordinates signing directly. The network effect is weaker, liquidity depends on makers, but there is no central coordinator at all.
The main implementations
Wasabi Wallet is the most widely used CoinJoin implementation. It uses the ZeroLink framework and supports CoinJoins mixing multiple denominations in one transaction, with a coordinator fee that scales with the target anonymity set. Wasabi 2.0 adopted the WabiSabi protocol, which allows flexible output amounts instead of fixed denominations, reducing the fingerprint that uniform outputs create.
Samourai Wallet ran Whirlpool, a Chaumian CoinJoin with fixed pools at 0.001, 0.01, 0.05 and 0.5 BTC, and a distinctive "Tx0" transaction that prepared UTXOs for mixing. The project was shut down in 2024 after its founders were arrested and charged with conspiracy to commit money laundering and operating an unlicensed money-transmitting business; the DOJ alleged Whirlpool processed over $2 billion in transactions. This event is central to any honest discussion of CoinJoin's legal status.
JoinMarket remains available as a command-line and desktop tool with its maker/taker market model. Its liquidity is thinner than the pooled wallets, so mixes can be smaller and slower, but it is fully decentralized and coordinator-free.
Related but distinct techniques include PayJoin (a two-party collaborative transaction that looks like an ordinary payment) and coin swaps (atomic exchanges that avoid an on-chain spend entirely). For a side-by-side comparison of tools, fees and ease of use, see our guide to Bitcoin privacy tools compared.
What privacy does CoinJoin actually provide?
The honest answer is "it depends on how you use it." CoinJoin breaks the direct input-to-output link for coins that have been mixed, so an analyst can no longer follow a single transaction trail through your spend. If you deposit BTC to an exchange after mixing, the exchange sees the mixed UTXO, but the exchange cannot automatically trace it back to your original funding source or your other coins.
However, several well-documented limitations remain:
- Anonymity set size. A 50-person mix gives you k-anonymity of roughly 50 against a naive analyst, but real-world analysis applies filters. Amounts, timing, fee patterns and wallet fingerprints shrink the effective set. The MIT Digital Currency Initiative's research on Whirlpool usage found that many mixes had small or low-quality participant pools.
- Change outputs. If you mix 0.5 BTC but only need to spend 0.1, the change output can still be linked back through careful analysis. Best practice is to mix whole UTXOs of equal size and avoid change wherever possible.
- Timing and amount heuristics. Inputs signed within milliseconds of each other, or amounts that survive denomination schemes, leak information. WabiSabi and randomized delays exist specifically to blunt this.
- Re-identification at the edges. CoinJoin protects the on-chain trail, not the endpoints. If you withdraw mixed coins to a KYC exchange, or spend them at a merchant who logs your IP, that is where de-anonymization typically happens, not on the blockchain.
- Chain analysis evolution. Researchers continue publishing CoinJoin-detection heuristics, and exchanges increasingly treat mixed coins as higher-risk. Some services restrict or delay withdrawals of tainted or heavily mixed UTXOs.
For a deeper look at how analysts actually trace transactions, see how blockchain analysis works and where it fails.
The legal situation: what the Samourai case changed
This is the section most articles gloss over, so here are the verified facts. In April 2024, U.S. authorities arrested Samourai Wallet co-founders Keonne Rodriguez and William Lonergan Hill, charging them with conspiracy to commit money laundering and conspiracy to operate an unlicensed money-transmitting business. Prosecutors alleged Whirlpool knowingly facilitated laundering of over $100 million in criminal proceeds from dark web markets, fraud schemes and sanctions evasion, within more than $2 billion in total processed volume. Both founders were later convicted; in November 2025 they were sentenced to prison terms. The company shut down and its coordinator infrastructure was seized.
Two legal points deserve careful distinction. First, using CoinJoin is not the same as running a mixing service. U.S. FinCEN guidance targets persons who "accept and transmit" funds for others; a user who mixes their own coins via a non-custodial protocol occupies a different position than the developer who operated and monetized the coordinator. Second, the DOJ's theory in Samourai, that a privacy tool whose operators knew it would be used by criminals constitutes money laundering conspiracy, is novel and contested; the Bitcoin Policy Institute and others have argued it risks criminalizing ordinary self-custody software.
That said, the enforcement signal is real. Privacy-enhancing Bitcoin tools now carry reputational and legal risk that simply did not exist before 2024, especially for developers, node operators and anyone running coordinator or maker infrastructure. If your threat model involves adversarial legal scrutiny, CoinJoin alone may not be sufficient, for many users, privacy-focused cryptocurrencies like Monero offer stronger guarantees with a different risk profile. Our overview of mixers versus CoinJoin also clarifies where the legal lines sit.
Best practices if you use CoinJoin
For legitimate privacy purposes, protecting financial history from commercial data brokers, securing savings, avoiding doxxing, CoinJoin remains a lawful and useful tool in most jurisdictions. If you use it:
- Use reputable, open-source software. Wasabi and JoinMarket are the realistic options post-Samourai. Verify you are on the official site or package repository; fake wallet downloads are a common theft vector.
- Never mix coins you plan to cash out to a KYC exchange. Mixing before selling creates a suspicious trail and can trigger exchange freezes. Mix for holding and spending privacy, not as a bridge to regulated on-ramps.
- Control your change. Configure equal-denomination outputs, avoid change where possible, and never combine mixed and unmixed coins in one spend, that undoes the work.
- Protect the endpoints. Use Tor or a VPN for wallet traffic, a dedicated device or VM for keys, and never reuse addresses. The blockchain is only one layer of your exposure. Our guide to VPN versus Tor covers the network layer.
- Understand fee and liquidity trade-offs. Larger anonymity sets cost more in fees and time. A small, fast mix may provide less protection than a large one, choose deliberately.
- Keep records for tax purposes. Privacy does not exempt you from reporting. Preserve transaction records privately; mixing complicates cost-basis tracking, so plan accordingly.
When CoinJoin is not enough
CoinJoin is a probabilistic privacy tool: it raises the cost of analysis rather than making transactions mathematically private. If your threat model includes a motivated state-level adversary, a well-funded analytics firm, or requirements for strong anonymity, consider that Monero's ring signatures, stealth addresses and RingCT provide default-on privacy at the protocol level, while Zcash's shielded pools offer zero-knowledge guarantees, with their own trade-offs in liquidity, exchange support and regulatory scrutiny. For practical Bitcoin privacy beyond mixing, see our guide on how to spend Bitcoin privately and the comparison of Wasabi, JoinMarket and Ashigaru.
CoinJoin remains one of the most elegant privacy ideas in cryptocurrency: no forks, no trusted third parties holding funds, no new tokens, just better use of a feature the protocol already had. Its limits are real, its legal environment has grown colder, and it should be treated as one layer of a privacy strategy rather than a complete solution.
References and further reading
- COLDCARD, What is CoinJoin?
- MIT Digital Currency Initiative, Whirlpool CoinJoin usage analysis
- Peter Todd, How Good Are the Widely Used CoinJoin Implementations?
- ArXiv, Adoption and Actual Privacy of Decentralized CoinJoin Implementations
- U.S. DOJ SDNY, Samourai Wallet superseding indictment
- Cointelegraph Research, Samourai shutdown implications for privacy tools
- Bitcoin Policy Institute, DOJ legal theory and self-custody
- Wasabi Docs, CoinJoin documentation
This article is provided for informational and educational purposes only. It is not financial, legal, or tax advice. Cryptocurrency privacy laws vary by jurisdiction and change frequently; consult a qualified professional before using privacy tools.
Comments 0