This paper reports the 4K- and 1K-class mechanical coolers developed for space use. The 4K-class cooler has been developed for Superconducting Submillimeter-Wave Limb-Emission Sounder (SMILES), which is to be operated onboard the International Space Station (ISS). The cooling capacity is 20mW at 4.5K, with the total input power of approximately 120W. The 1K-class cooler has been developed for cooling far-infrared detectors to 1.7K in the Space Infrared Telescope for Cosmology and Astrophysics (SPICA). The cooling capacity is 10mW at 1.7K and the total input power to the cooler is about 180W. A future possible cryogen-free cooling system for temperature below 0.1K is also presented, which uses these coolers as a pre-cooler.