Abstract. We present a method to characterize not only shape but also depth of defects in line and space mask patterns. Features in a mask are too fine for a conventional imaging system to resolve them and a coherent imaging system providing only the pattern diffracted by the mask is used. Then phase retrieval methods may be applied, but the accuracy is too low to determine the exact shape of the defect. Deterministic methods have been proposed to accurately characterize the defect, but this requires a reference pattern. We propose to use a phase retrieval algorithm to retrieve the general shape of the mask and then apply a deterministic approach to precisely characterize the defects detected. © The Authors. Published by SPIE under a Creative Commons Attribution 3.0 Unported License. Distribution or reproduction of this work in whole or in part requires full attribution of the original publication, including its DOI.