We have constructed a scanning probe microscope for magnetic imaging, which can function as a scanning Hall probe microscope (SHPM) and as a scanning SQUID microscope (SSM). The scanning scheme, applicable to SHPM and SSM, consists of a mechanical positioning (sub) micron-XY stage and a flexible direct contact to the sample without a feedback control system for the Z-axis. With the interchangeable capability of operating two distinct scanning modes, our microscope can incorporate the advantageous functionalities of the SHPM and SSM with large scan range up to millimeter, high spatial resolution (⩽4 μm), and high field sensitivity in a wide range of temperature (4.2 K-300 K) and magnetic field (10(-7) T-1 T). To demonstrate the capabilities of the system, we present magnetic images scanned with SHPM and SSM, including a RbFeB magnet and a nickel grid pattern at room temperature, surface magnetic domain structures of a La(2/3)Ca(1/3)MnO3 thin film at 77 K, and superconducting vortices in a striped niobium film at 4.2 K.