We develop a strategy to measure the economic costs of poorly written laws, a potential threat to the rule of law. Using the full corpus of Italian legislation, we show that legal uncertainty ― measured by the probability of disagreement between the Supreme Court of Cassation and lower courts ― is higher for cases involving poorly written laws and varies systematically across courts. To identify the economic impacts, we exploit a reform that reassigned firms to courts. We estimate that GDP would be 5 percent higher if laws had been written as clearly as the Constitution, with two-thirds of the loss accruing over the past 20 years.