© 2017 The Royal Society of Chemistry. Mesoporous Ni-doped SnO2 thin films synthesized from variable [Ni(ii)/Sn(iv)] molar ratios (0:100, 5:95, 10:90, 15:85 and 20:80), thicknesses in the range of 100-150 nm, and average pore sizes lower than 10 nm were obtained through a sol-gel based self-assembly process using Pluronic P-123 as a structure-directing agent. Grazing incidence X-ray diffraction experiments indicate that the films mostly possess a tetragonal SnO2 structure with Ni2+ in substitutional positions, although energy-dispersive X-ray analyses also reveal the occurrence of small NiO clusters in the films produced from high [Ni(ii)/Sn(iv)] molar ratios (corresponding to a Ni amount of 8.6 at%). X-ray photoelectron spectroscopy experiments indicate the lack of metallic Ni and the occurrence of oxygen vacancies in the mesoporous films. Interestingly, the magnetic properties of these mesoporous films significantly vary as a function of the doping percentage. The undoped SnO2 films exhibit a diamagnetic behavior, whereas a clear paramagnetic signal dominates the magnetic response of the Ni-doped mesoporous films, probably due to the presence of NiO as a secondary phase. A small ferromagnetic-like contribution superimposed to the paramagnetic background is observed for samples with high Ni contents, possibly stemming from the combined effect from Ni incorporation and the occurrence of oxygen vacancies.