The invention relates to a method for detecting the cleanness of a compressed air pipeline of an offshore oil platform. The method is used for measuring granularity grades of water, oil and solid in compressed air of an instrument of the offshore oil platform and specifically comprises the following steps: preparing before detecting, firstly, blowing off compressed air for about 5min according to a theoretical calculated flow rate, switching off a valve; secondly, performing air sampling connection; thirdly, performing dew point detection, detecting a water content of the compressed air of the instrument, firstly connecting a gas inlet of a dew point analyzer with an air pipeline sampling hole by adopting the dew point analyzer; then performing oil detection, firstly, dismantling a tail end connecting tool, opening a pipeline, performing white light detection, ultraviolet detection and wiping inspection; and finally detecting air particles, detecting particles of the compressed air, and performing three times of sampling by adopting an air particle detector. The method has the advantages that simplicity is realized, the concentrations of water, oil and solid particles in the compressed air can be accurately detected, and detection results meet the standard requirement of ISO8573.1.