We examine whether firms hold more cash in the face of tax uncertainty. Because of gray areas in the tax law and aggressive tax avoidance, the total amount of tax that a firm will pay is uncertain at the time it files its returns. The tax authorities can challenge and disallow the firm’s tax positions, demanding additional cash tax payments. We hypothesize that firms facing greater tax uncertainty hold cash to satisfy these potential future demands. We find that both domestic firms and multinational firms hold larger cash balances when subject to greater tax uncertainty. In terms of economic significance, we find that the effect of tax uncertainty on cash holdings is comparable to that of repatriation taxes. Our evidence adds to knowledge about the real effects of tax avoidance and provides a tax-based precautionary explanation for why there is such wide variation in cash holdings across firms.