The invention discloses a method for verifying the complexity of router passwords. A weighted verification method is adopted for the router passwords, and different types of characters Si (i=1, 2, 3...n) in the router passwords are assigned different characters. The weight wi (i=1, 2, 3...n), when the quantity of a certain character Si is not 0, then the total weight of this character Si is wi, then the total weight of the router password is Σwi (i=1, 2, 3...n), and the complexity of the router password is judged by the total weight Σwi. The present invention first adopts the weighted verification method, which assigns different weights to different types of characters such as numbers, letters and special characters, and checks the complexity of the password by calculating the total weight of the password. The algorithm is relatively simple and fast, and can also It is a relatively simple and effective method to prompt the complexity of the user's password in real time according to the verification result, and is suitable for use on various embedded devices such as routers.