More and more attention is being paid to non-destructive testing of connecting elements. Currently, ultrasound control is widely used. A prerequisite for an effective and reliable process of ultrasonic testing is the grain size of the analysed metal. One option for influencing non-grain size of a steel part is to vary the heat treatment and tempering conditions. As part of the study, an assessment was made of the heat treatment modes of steel parts for grain size. It has been established that by changing the heat treatment and tempering regime it is possible to obtain grain with a size of 3-5 points. The optimal mode of the heat treatment process was selected, which allows to obtain the minimum grain size of 4-5 balls that is acceptable for ultrasonic testing.