  Miniaturized mechanical resonators have proven to be excellent force sensors.
However, they usually rely on resonant sensing schemes, and their excellent
performance cannot be utilized for the detection of static forces. Here, we
report on a novel static-force sensing scheme and demonstrate it using
optically levitated nanoparticles in vacuum. Our technique relies on an
off-resonant interaction of the particle with a weak static force, and a
resonant read-out of the displacement caused by this interaction. We
demonstrate a force sensitivity of $10\,\mathrm{aN}$ to static gravitational
and electric forces acting on the particle. Our work not only provides a tool
for the closer investigation of short-range forces, but also marks an important
step towards the realization of matter-wave interferometry with macroscopic
objects.
