Objective To introduce how to use Stata software to implement the randomization of clinical trials. Methods Some examples were taken to describe how to implement the randomization of each kind of clinical trials. Results Stata implemented its required functions, such as simple randomization, stratified randomization, block randomization and the randomization of group treatment. Conclusion Stata can easily implement the randomization of clinical trials.