Microstructures of yttria-stabilized zirconia (YSZ) thin films deposited by spray pyrolysis at 370 °C on sapphire are investigated. The as-deposited films are predominantly amorphous and crystallize upon heating at temperatures above 370 °C, developing grains in the range of 5 nm to several 100 nm. During post-deposition heat treatment up to 800 °C, ∼ 50 vol% porosity develops in the center of the films with gradients towards almost dense interfaces to the air and substrate. The reason for this porosity is the decomposition of residues from the precursor and the free volume liberated due to crystallization. Dense YSZ thin films consisting of one monolayer of grains are obtained with annealing temperatures exceeding 1200 °C. In gadolinium-doped-ceria (CGO) thin films similar microstructures and porosity are found after low-temperature heat treatments indicating that the precursor residues due to the deposition method are the main cause of the porosity. Grain growth stagnation in annealed thin films is observed in both the YSZ and in CGO thin films. Stagnating grain growth in the thin films is rather caused by reduced grain boundary mobility, here predominately due to a “secondary phase”, i.e., pores, than to other effects. The stagnation ceases at higher annealing temperatures after densification has taken place.