Origins and Spread
On 9 February 2020 Hangzhou’s Yuhang district launched a health code on Alipay, and on 11 February the whole city adopted the “Hangzhou health code”. Residents and people planning to enter Hangzhou declared their identity, travel and health online and received a colour code: a green code allowed free passage, a yellow code required up to 7 days of quarantine and a red code 14 days, turning green after days of normal health check-ins. Zhejiang adopted it province-wide on 16 February, and the same day the State Council General Office’s e-government office directed Alipay to speed up a nationally unified epidemic-prevention health code. WeChat introduced a similar function. According to Fan Liang of the University of Michigan, the code became mandatory for public spaces in more than 300 cities, with a green code needed for workplaces, public transport, schools, airports, restaurants, hotels and grocery stores.
Controversy
Researchers noted that rules varied by locality—a yellow code meant 7 days of quarantine in Hangzhou but 14 in Shandong—that a green code did not guarantee health, as some green-code holders in Wuhan tested positive, and that it was unclear who controlled the data flows, who owned users’ health data and how governments regulated the system. In June 2022 Zhengzhou officials, without authorisation, turned the codes of 1,317 depositors of Henan village banks red to stop them from petitioningPetitioning (xinfang / shangfang)上访与信访The system through which citizens bring complaints and requests to Party and government bodies by letter or in person; going in person is commonly called shangfang. Officially, petitioning is “an important part of the Party’s mass work”; human rights groups have criticised local governments for intercepting petitioners and holding them in unlawful “black jails”, the existence of which the government denies.Read the full entry → in Zhengzhou; the city’s discipline authorities called it “a typical case of acting arbitrarily” and punished five officials.
End of Checks
On 7 December 2022 the comprehensive group of the State Council’s joint prevention and control mechanism issued a notice that health codes would no longer be checked except at special venues such as nursing homes, welfare institutions, medical facilities, childcare centres and primary and secondary schools, and that people travelling between regions would no longer have their negative test certificates or health codes checked.
Related events
Sources
- Zhengzhou Commission for Discipline Inspection and Supervision, Bulletin on the Investigation and Accountability for Red Codes Given to Some Village Bank Depositors (22 June 2022, via The Paper)
- Zhejiang Daily, “Green, Yellow and Red Codes: Hangzhou Health Code Goes Live” (11 February 2020)
- State Council Joint Prevention and Control Mechanism, Notice on Further Optimising the Implementation of COVID-19 Prevention and Control Measures (7 December 2022)
- Fan Liang, “COVID-19 and Health Code: How Digital Platforms Tackle the Pandemic in China,” Social Media + Society (2020)
- Hangzhou.com.cn, “Nationwide in Seven Days: The Hangzhou Speed of the Health Code” (18 February 2020)
Last verified:
Cite this page
Chronicles of Modern China. (2026, December 4). Health code. Retrieved December 4, 2026, from https://www.cmcarchive.org/glossary/health-code
“Health code.” Chronicles of Modern China. Last modified December 4, 2026. Accessed December 4, 2026. https://www.cmcarchive.org/glossary/health-code.
Chronicles of Modern China. Health code[EB/OL]. (2026-12-04)[2026-12-04]. https://www.cmcarchive.org/glossary/health-code.