This study aimed to evaluate the content of 11 inorganic elements (Al, Cr, Co, Ni, As, Mo, Cd, Sb, Ba, Hg, and Pb) in commercial plant-based and animal-based yogurts for comparison purposes. The samples were mineralized using a simple and fast ultrasound-assisted acid digestion method at 80 °C for 35 min, and the determination of inorganic elements was performed by ICP-MS. The method was validated according to the INMETRO guide, obtaining recoveries from 80 to 110%, precision from 6 to 15%, and a limit of quantification (LOQ) ranging from 200 µg/kg (Al) to 4 µg/kg (other elements). The element concentrations in the plant-based yogurts were Al(<LOQ-9019.05); Cr(<LOQ-88.14); Co(<LOQ-40.56); Ni(31.71-700.46); As(<LOQ-10.61); Mo(<LOQ-355.70); Cd(<LOQ-4.37); Sb and Hg(<LOQ); Ba(<LOQ-1505.71), and Pb(<LOQ-21.58) µg/kg. The elements Mo and Ba were quantified only in the animal-based yogurts, with levels of 72.54 and 160.76 µg/kg, respectively. The results showed a large variation in the concentration of inorganic elements, which demonstrates the importance of knowing the composition of plant-based foods to ensure the safety and health of consumers.