I determine the optimal income tax schedule when individuals both choose endogenously their labour supply and have the possibility of avoiding paying taxes. Considering a convex concealment cost function, I propose a formula for the optimal marginal tax rate, that generalizes the formula of the standard Mirrlees model to the case of tax avoidance. I also show that the results obtained by Casamatta (2021) in the fixed income case hold true when labour supply is endogenous: with a low enough marginal cost of avoidance, it is optimal to let some taxpayers, located in the interior of the skill distribution, avoid taxes