Ionograms generated by ionosondes contain significant information on the ionosphere. The scaling and inversion of the ionograms are important first steps for understanding the ionograms and monitoring the real‐time ionosphere. In this paper, a new algorithm is proposed to automatically scale the ionograms with separated O and X waves based on the Chinese Academy of Sciences Digital Ionosonde. The new autoscaling method is achieved mainly by the image recognition technique, mathematical morphology, and graph theory, and critical parameters are identified based on the ionospheric characteristics. To illustrate the efficiency of this algorithm, 10,560 ionograms from the Chinese Academy of Sciences Digital Ionosonde installed in Huailai (40.40°N, 115.52°E), Ganzi (31.64°N, 99.96°E), Wuhan (30.52°N, 114.31°E), Nanning (22.84°N, 108.33°E), and Xiamen (24.26°N, 118.04°E), in north, south, and central China, are used to test the new algorithm. A good performance in automatic scaling was achieved where the values of foF1 and foF2 both agree with the values of hand‐scaled for 91.4% ionograms. The remaining ionograms are almost unscalable manually due to the trace complicity that requires extensive training experience.