The invention provides an oil-free piston compressor of a medical vaporizer. The oil-free piston compressor comprises a crankshaft, an air cylinder, a piston, a connection rod, an air cavity and an air valve, wherein the crankshaft and the air cylinder are connected with an output shaft of a motor, the piston is mounted in the air cylinder in an inserted manner, the crankshaft and the piston are connected via the connection rod, the air cavity is fixed on an end portion of the air cylinder, the air valve is arranged between the air cavity and the air cylinder, the air cylinder is provided with an air inlet and an air outlet, and the air inlet comprises an extension portion fixed inside the air cavity. The air inlet is provided with the extension portion in the air cavity, overlap between vibration generated due to airflow flows into the air cavity from the air inlet and intrinsic frequency of the oil-free piston compressor, sound resonance phenomenon is reduced, and noise is greatly lowered.