We investigate the differences between the dielectric properties of bulk silicon nitride and thin films, in both crystalline and amorphous structures. We show that to correctly account for the decrease of the optical ( ∞ ) and static ( 0 ) dielectric constants at the nanoscale, it is necessary to take into account their spatial variations within the film and at the surface. A model based on the assumption of abrupt interfaces between vacuum and the film surfaces predicts the wrong trend of the dielectric properties as a function of the film thickness, i.e., an increase of ∞ and 0 as the dimension of the film decreases. We also show that a first-principles description of the structural properties of amorphous bulk and thin films is necessary, in order to obtain structural properties in agreement with experiment, and thus electronic and dielectric properties consistent with available measurements.