This paper studies the interaction between fiscal commitment and sovereign default risk in a model with optimal taxation and government spending. A time-inconsistency problem arises in our framework as the government cannot credibly commit to its future tax policies. As a result, it chooses suboptimally low fiscal adjustments and defaults too frequently. Introducing a commitment device to future tax policies can mitigate this time-inconsistency problem and improve the government's borrowing opportunities. However, such a commitment device also entails a loss of tax contingency that might be costly. Our quantitative analysis shows that committing to an inflexible tax plan is counterproductive: the lack of contingency hurts the government's debt sustainability and reduces welfare. In contrast, committing to a flexible tax plan that is contingent on future economic conditions can improve debt sustainability by 53.3% and result in a significant welfare gain.