The high spatial resolution of a magnetic force microscope (MFM) has been studied with respect to a tip-sample separation, theoretically and experimentally. In the estimations, the MFM resolution becomes high as the separation decreases. The separation of less than 1 nm provides an advanced resolution of less than 10 nm. In the experiments, the probe of the conventional MFM cannot be allowed to come within 10approx.20 nm of the sample to avoid mixing the atomic force with the magnetic force. By contrast, just-on-surface-MFM (JS-MFM), which allows for the MFM measurement at a small separation within 1 nm, can provide a detailed observation of the localized surface magnetic stray field with an advanced resolution of less than 10 nm.