Laser‐induced breakdown spectroscopy (LIBS) is a fast and reliable technique suitable for the simultaneous qualitative and quantitative analysis of major and trace elements in samples of various nature and origin. In last decades, the use of metal accumulator plants, in combination with compost, has become a cheap and sustainable alternative technique to lower soil contamination by toxic heavy metals. In the present work, the LIBS technique has been applied to measure the concentrations of selected elements, including Al, Ca, Cr, Cu, Fe, K, Mg, Mn, Na, Pb, Sr, and Zn, in two composts of different origin and nature and four accumulator plant species (Atriplex halimus, Brassica alba, Brassica napus, and Eruca vesicaria). The plant samples were analyzed either as bulk plant material or as specific organs (i.e. shoots and roots). The concentrations measured by LIBS were assessed by complementary induced coupled plasma‐optical emission spectroscopy. The significant correlation found between the data obtained by the two techniques (R = 0.732–0.999) supports the feasibility of LIBS for fast screening of major, trace and toxic elements in plant and compost samples. In conclusion, the LIBS technique shows promising for further applications in soil remediation as well as in agriculture.