The title compound, C9H8N2O, is almost planar, with the C atom of the methoxy group deviating from the mean plane of the quinazoline ring system (r.m.s. deviation = 0.011 Å) by 0.068 (4) Å. In the crystal, molecules form π–π stacks parallel to the b-axis direction [centroid–centroid separation = 3.5140 (18) Å], leading to a herringbone packing arrangement.