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.