Epidemic prevention health code plays an important role in strengthening epidemic management and achieving accurate prevention and control. At the same time,it is necessary to strengthen the protection of personal information. The collection and use of the health code for epidemic prevention should follow the principles of legality,necessity,limitation of purpose,informed consent,balance of interests and information protection. When using the personal information,there are risks such as information disclosure and beyond the purpose of use. Therefore,we should take the initiative to prevent it,and those who infringe on personal information rights should bear the legal responsibility.