We study the cohomology of Jacobians and Hilbert schemes of points on reduced and locally planar curves, which are however allowed to be singular and reducible. We show that the cohomologies of all Hilbert schemes of all subcurves are encoded in the cohomologies of the fine compactified Jacobians of connected subcurves, via the perverse Leray filtration. We also prove, along the way, a result of independent interest, giving sufficient conditions for smoothness of the total space of the relative compactified Jacobian of a family of locally planar curves.