Tomato (Solanum lycopersicum L.) is one of the most important crops in the world and represents a key crop in southern Italy. With the aim to evaluate the nutritional characteristics of tomato fruits in relation to NPK and compost fertilisation, the concentrations of the main nutrients, toxic elements, primary metabolites and total phenols were determined in two varieties (Lido and San Marzano). Each variety was cultivated in a different experimental field, subjected to different agronomic techniques. Concentrations of toxic elements (Cd and Pb) were below the limits indicated by the EU Regulation (2011) in all the fruits analysed. Moreover, fruits obtained from San Marzano plants grown on organic amended soils showed a better overall quality than those obtained on mineral fertilised soil, being characterised by lower N (attributed to lower nitrate and nitrite concentrations), lower Cd, and higher soluble sugar concentrations. Higher concentrations of soluble sugars in fruits from organic amended soils were also observed in the Lido variety. The agricultural use of quality compost represents an effective strategy to obtain high quality products in an economically and environmentally sustainable way. © 2016 Society of Chemical Industry.