We shall introduce the singular curvature function on cuspidal edges of surfaces, which is related to the Gauss-Bonnet formula and which characterizes the shape of cuspidal edges. Moreover, it is closely related to the behavior of the Gaussian curvature of a surface near cuspidal edges and swallowtails.