Primordial black holes can form in the early Universe from the collapse of cosmological perturbations after the cosmological horizon crossing. They are possible candidates for the dark matter as well as for the seeds of supermassive black holes observed today in the centre of galaxies. If the perturbation is larger than a certain threshold, depending on the equation of state and on the specific shape of the perturbation, a black hole is formed. In this talk I will discuss the dependence of PBH formation from the initial shape of the curvature profile showing the relation between the threshold amplitude and the initial shape of the inflationary power spectrum of cosmological perturbations, taking into account also possible primordial non-Gaussianity. Although the abundance of PBHs could vary by several order of magnitudes depending on the model of inflation, we find that the threshold of PBH formation is rather solid against non linearities.