You need to apply for a visa unless you belong to the following categories:
(1) According to bilateral agreements, citizens of some countries holding appropriate passports (list of Agreements on Mutual Visa Exemption Between the People's Republic of China and Foreign Countries） may enter China without a visa provided that their stay in China shall not exceed 30 days from the date of entry into China. While in China, they should apply to the department concerned for the extension of the duration of stay in advance if they want to stay longer.
(2) Citizens of Singapore, Brunei and Japan holding ordinary passports may enter China without a visa through the ports of entry open to foreigners provided that they come to China for tourism, family visit, business or transit, and intend to stay in China for no more than 15 days. However, the following personnel of these three countries must apply for a visa in advance if:
a) They are holders of ordinary passports, and come to China for tourism, family visit or business, and intend to stay in China for more than 15 days;
b) They are holders of ordinary passports, and come to China for study, employment, permanent residence or on a news reporting mission;
c) They are holders of diplomatic and service(official) passports;
(3) Foreigners holding ordinary passports of the countries having diplomatic relations with China and on a tour to Hong Kong or Macao, and participating in group tours to the Zhu Jiang River (Pearl River) Delta Area for a stay of less than six days organized by the travel services legally registered in Hong Kong or Macao shall not need to apply for a visa. The Zhu Jiang River (Pearl River) Delta Area refers to the administrative area of the 10 cities below: Guangzhou, Shenzhen, Zhuhai, Foshan, Dongguan, Zhongshan, Jiangmen, Zhaoqing, Huizhou and Shantou.
(4) Foreigners who have confirmed onward tickets and seats on international flights and directly transit through China and stay for no more than 24 hours within the airport boundaries shall not need to apply for a transit visa. Anyone desiring to go beyond the airport boundaries temporarily should obtain permission from the frontier inspection office.
Foreigners who are travelling on connected international flights with confirmed seats and transit through two or more cities in China by civil flights in no more than 24 hours shall not need to apply for a transit visa. However, permission from the frontier inspection office must be obtained.
(5) No visa is required for citizens of the following 30 countries, who transit through China via Shanghai within 48 hours, no matter what type of passports they may hold: Republic of Korea, the United States of America, Canada, Australia, New Zealand, and the Schengen states -- Germany, France, Austria, Sweden, Denmark, Norway, Finland, Iceland, the Netherlands, Belgium, Luxemburg, Spain, Portugal, Greece, Italy, Estonia, Poland, Czech Republic, Latvia, Lithuania, Malta, Switzerland, Slovakia, Slovenia and Hungary. Under this circumstance, anyone desiring go to beyond the airport boundaries temporarily should obtain permission from the frontier inspection office. If entering Shanghai as a visitor instead of transiting, they should obtain a visa in advance.
(6) Citizens holding ordinary passports of the following 24 countries and in group tours to Hainan Province for a stay of less than 15 days organized by the international travel services approved by the National Tourism Administration of China and registered in Hainan Province shall not need to apply for a visa: Malaysia, Thailand, Republic of Korea, the Philippines, Indonesia, Germany, the UK, France, Austria, Italy, Russia, Switzerland, Sweden, Norway, Finland, Denmark, Spain, the Netherlands, the United States of America, Canada, Australia, New Zealand, Ukraine and Republic of Kazakhstan.
Citizens of Russia, Republic of Korea and Germany can stay in the Hainan Province for individual tourim not more than 21 days.
(7) Part of the personnel of foreign airlines offices resident in China and crew members on international flight and trains are exempted from visa requirements or entitled to simplified visa application procedures in accordance with the agreements between the Chinese Government and the governments of their respective countries.
Except for the foreign citizens mentioned-above, all other foreigners shall have to apply for a visa in advance.