With the wide application of QR code, the security problem of QR code is serious, such as information leakage and data tampering. In order to solve the QR information security problem, this paper proposed a secure QR code schema based on visual cryptography. The QR code is divided into two share images that can be transmitted separately. The generation of the two share images is based on the pseudo-random matrix, that is, the pixels in the two share images are determined by the corresponding values in the pseudo-random matrix. The two share images can be stacked simply to restore the information. Simulation results show that the QR code image can be well hidden, and it can be restored effectively.