Visa-free stopover via international airports
For citizens of Albania, Argentina, Australia, Austria, Belgium, Bosnia and Herzegovina, Brazil, Brunei, Bulgaria, Canada, Chile, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Iceland, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Macedonia, Malta, Mexico, Montenegro, Netherlands, New Zealand, Poland, Portugal, Qatar, Romania, Russia, Serbia, Singapore, Slovakia, Slovenia, South Korea, Spain, Sweden, Switzerland, Ukraine, United Arab Emirates, United Kingdom, and United States/American Samoa, you are allowed a 144-hour visa-free stopover in Beijing/Tianjin/Shijiazhuang or Shanghai/Hangzhou/Nanjing or Dalian/Shenyang, or a 72-hour visa-free stopover in Changsha, Chengdu, Chongqing, Guangzhou, Guilin, Harbin, Kunming, Qingdao, Wuhan, Xi'an or Xiamen provided you meet several conditions including:
You must have a confirmed, onward ticket to a third country before you board your flight to China (your onward flight out of China does not need to be in the same booking/ticket as your flight to China). Hong Kong, Macau, and Taiwan are "international flights" so you may fly there on a non-stop flight after your time in mainland China.
You cannot have a direct onward ticket to the same country from which you flew in, even if the cities are different (for example, New York-Beijing-Los Angeles would not qualify, but New York-Beijing-Hong Kong-Los Angeles would qualify).
You can stopover visa-free on both the outbound and return journeys of your itinerary (for example, London-Shanghai-Hong Kong-Beijing-London). In fact, you can stopover visa-free as many times as you want on any number of itineraries as long as your direct flight into mainland China was from a country different to the destination country of your direct onward flight out of mainland China.
You also must fly into and fly out of the same city and airport. Note: In Shanghai/Hangzhou/Nanjing, you can travel into and out of any airport (or land/sea border) in the 3 cities (for example, into Shanghai Pudong and out of Hangzhou, or into Shanghai Pudong and out of Shanghai by direct cross-border train to Hong Kong). Similarly, in Beijing/Tianjin/Shijiazhuang/Qinhuangdao, you can travel into and out of any airport (or land/sea border) in the 4 cities. Also, in Dalian/Shenyang, you can travel into and out of any airport (or land/sea border) in the 2 cities.
The 144 or 72 hour period begins at 00:01 the day after your arrive (except in Guilin, Harbin and Kunming, where the 72 hour period begins at the scheduled arrival time of your flight). For example, if you arrive in Shanghai at 06:00 on 1 January, you can stay until 23:59 on 7 January, but if you arrive in Kunming at 06:00 (scheduled flight arrival time) on 1 January, you can only stay until 06:00 on 4 January.
If you use the 72-hour visa-free stopover, you may not leave the metropolitan area of the city you arrive in (except for stopovers in Guangzhou, where you are permitted to travel anywhere within Guangdong Province during the stopover period). For example: You cannot fly into Beijing, take another flight to Shanghai or Guangzhou and leave China from there under the 72-hour transit rule. However, if you use the 144-hour visa-free stopover in Shanghai/Hangzhou/Nanjing, you can move freely within the whole of Shanghai Municipality, Jiangsu Province and Zhejiang Province. Similarly, if you use the 144-hour visa-free stopover in Beijing/Tianjin/Shijiazhuang/Qinhuangdao, you can move freely within the whole of that area (including Hebei Province). If you use the 144-hour visa-free stopover in Dalian/Shenyang, you can move freely between the two cities.
There is no minimum required time you need to spend in the third country (for example, if your itinerary is London-Shanghai-Hong Kong-Beijing-London, as long as you were physically present in Hong Kong after flying from Shanghai and before flying into Beijing, you would qualify for a visa-free stopover in Shanghai and Beijing).
More details can be found here: [7]. There is also a dedicated discussion and wiki-style summary on China's visa-free stopover policies in the FlyerTalk forum.
If you do not qualify for the 144 or 72 hour visa-free stopover (for example, if you are not flying into or out of one of the qualifying airports, or if you are not a citizen of one of the qualifying countries), you may be able to avail of the 24 hour visa-free stopover instead. This is available at all airports in China served by international flights (except for Fuzhou, Mudanjiang, Shenzhen and Yanji airports, and available at Urumqi airport only if you spend no more than 2 hours in Urumqi). The 24 hour period begins from your scheduled flight arrival time, until your scheduled flight departure time. For the 24 hour visa-free stopover, there are no territorial restrictions on your movement within mainland China (except Tibet) during your stopover, and you are not required to fly out of the same airport as the one you flew into. For example, if you arrive in Beijing at 06:00, you can travel to another city and fly out of another airport as long as your scheduled departure time is before 0midnight of the next day.