The invention relates to functionalized dihydro- and tetrahydro-quinazoline compounds, pharmaceutical compositions comprising such compounds, and the use of such compounds as heparanase inhibitors for the treatment of diseases or conditions related to heparanase.