Studying urban soils is an important tool for assessing and identifying sources of pollution in urban centers and better understating their impacts on human health, especially given the intensification of urbanization processes in Brazilian cities. Topsoil samples (0-5cm) were collected from urban parks (Bosque Park and Limeira Park) and unforested places (Prada School and School of Technology – FT) from Limeira City (Brazil) during 2019–2020 to quantify the inorganic composition of urban soils, apply pollution indices, compare the results with reference guidelines values, and identify the main contamination sources using Principal Component Analysis (PCA) and Positive Matrix Factorization Model (PMF). Results showed that all samples presented concentrations of trace elements related to anthropic sources. Cu, Cd, Zn, and Pb concentrations have enriched compared with the upper continental crust values. The FT, Limeira Park, and Prada School had the highest concentrations of Cd, Pb, and Zn, respectively. Bosque Park, in turn, showed the largest Cr, Cu, and Ni concentrations. Distance from issuing sources, the presence of dense vegetation, and the physical and chemical properties of soil (pH, cation exchange capacity – CEC, clay and organic matter percentages) were the main explaining factors for the concentrations found. Overall, the main sources of contamination are related to industries, fertilizers, vehicular exhaust and geogenic sources. Our results suggest that wooded urban parks have greater potential to store toxic elements than unforested places. Moreover, wooded urban parks provide an important ecosystem service in urban areas and should be considered in public policies aimed at promoting sustainable cities.