Short answer
Shanghai to Nanjing is 301 km of the busiest high-speed corridor in China. The quickest G trains cover it in about an hour — one listing records a 59-minute journey — and most work out at 1h 15m to 1h 50m. More than 300 pairs of trains run each day, so a departure is almost always available.
Most trains leave from Shanghai Hongqiao (上海虹桥) and arrive at Nanjing South (南京南). Second class starts at about ¥105 on the slower services and costs more on the fastest trains. Some services use Shanghai Station instead, and conventional trains use Shanghai South or Songjiang North with Nanjing Station (南京站) at the far end.
Sleepers exist on this corridor — conventional trains carry hard and soft berths — but a bed makes little sense for a one-hour journey. Tickets go on sale on 12306 15 days before departure, and your passport is your ticket.
The route at a glance
| Item | Detail |
|---|---|
| Distance | 301 km (about 187 miles) between the two cities |
| Line opened | 1 July 2010 |
| Stations | Shanghai Hongqiao or Shanghai Station → Nanjing South or Nanjing Station |
| Fastest journeys | About 59 minutes to 1h 05m on the quickest G trains |
| Typical journey | 1h 15m – 1h 50m |
| Departures | More than 300 high-speed pairs a day, roughly 06:00 to 22:00, plus about 47 pairs of conventional trains |
| Second class fare | From about ¥105 on the high-speed services |
| Conventional trains | 3–5 hours, from Shanghai South or Songjiang North to Nanjing Station, with hard seats and sleeper berths |
Fare and frequency figures come from route listings that are themselves compiled from the timetable. They are accurate enough to plan with and not accurate enough to argue about — 12306 is the authority for your date.
Which station at each end
The Shanghai side is mostly decided for you. The Nanjing side is where visitors lose time, because the city has two stations that serve two different parts of town.
| Station | Where it is | Metro |
|---|---|---|
| Shanghai Hongqiao 上海虹桥 | Western suburbs, sharing a complex with Hongqiao Airport Terminal 2 | Lines 2, 10 and 17 |
| Shanghai Station 上海站 | Central Shanghai, north of the centre and closer to the Bund | Lines 1, 3 and 4 |
| Shanghai South 上海南站 | South of the centre; conventional and some high-speed departures | Lines 1, 3 and 15 |
| Songjiang North 松江 | Far south-west of Shanghai; conventional trains only | Line 9 corridor, plus a transfer |
| Nanjing South 南京南 | South of the historic centre, and the hub for almost every high-speed train | Lines 1, 3, S1 and S3 |
| Nanjing Station 南京站 | North of Xuanwu Lake, close to the lake and the city wall | Lines 1 and 3 |
How long does it actually take?
| Service | Typical duration | Notes |
|---|---|---|
| Fastest G trains | 59 min – 1h 05m | Few stops, and often the first to sell out |
| Most G trains | 1h 15m – 1h 50m | The realistic range for a normal booking |
| D trains | Around two hours | Bullet stock, slightly cheaper, noticeably slower on this corridor |
| Conventional T, K and Z trains | 3–5 hours | From Shanghai South or Songjiang North to Nanjing Station; hard seats and sleepers |
Half an hour of difference rarely changes a trip. What does change a trip is arriving at Nanjing South and then discovering your first stop is 15 km back the way you came.
Seat classes on this route
High-speed trains between the two cities are all-seated: second class, first class and business class. There are no beds on the fast stock, which is why the sleeper conversation belongs to the conventional services. Our train seat classes guide explains what each class is called in Chinese, which matters when a station display is showing 二等座 and 一等座 and nothing else.
- Second class (二等座). The standard fare and the one almost everyone buys. On a journey of an hour or two it is comfortable.
- First class (一等座). A wider seat in a smaller cabin. Worth it on a long haul; optional here.
- Business class (商务座). The premium cabin, priced several times higher. On this route it buys comfort rather than time.
- Conventional berths. Hard sleeper (硬卧), soft sleeper (软卧) and hard seat (硬座) on the older trains. Listings quote hard seats around ¥40–¥50, hard sleepers around ¥95–¥105 and soft sleepers around ¥140–¥155, but these are third-party figures and change with the train — verify in the app.
Is an overnight sleeper a realistic option?
Possible, rarely sensible. Conventional trains on the Shanghai–Nanjing line run late into the night and carry berths, so a sleeper is technically available. The arithmetic works against it: three to five hours in a cabin against about an hour in a seat, and an early-morning arrival that lands before most hotels will let you check in.
Two cases where a berth earns its place: you are continuing west towards Xi'an or Chengdu and want to sleep through the first leg, or every high-speed departure on your date is full. Our train sleeper guide covers berth types and how to read the cabin letters on a ticket.
How to book with a foreign passport
- Register on 12306 before you travelUse
12306.cn/enor the 12306 app. Both have English interfaces, both accept foreign passports, and neither needs a Chinese bank account. - Add yourself as a passengerThe booking name must match the machine-readable zone of your passport exactly. A mismatch is the single most common reason a gate refuses a passenger.
- Choose the station pair, not just the citySearch Shanghai to Nanjing, then read the departure and arrival columns. Hongqiao to Nanjing South is the default; Shanghai Station and Nanjing Station are worth considering for specific hotels.
- Pay with Alipay or WeChat Pay12306 does not take foreign credit cards directly. Both wallets accept foreign-issued Visa and Mastercard after verification.
- Book early on your travel datesThe window opens 15 days ahead. The fastest trains and business class are the first to go on Friday and Sunday evenings, and the days around public holidays are their own category of difficult.
- Board with your passportSecurity screening at the entrance, a passport scan at the gate, sometimes a second scan at the platform. Gates close before departure, so treat the departure time as the end of the process rather than the start.
The full walkthrough of registration, passenger profiles, waitlists and payment sits in our guide to buying train tickets in China as a foreigner, and the app itself is covered screen by screen in the 12306 in English guide.
Practical notes for the trip
- Arrive 30 minutes before departure at Hongqiao. The station is one of the largest in the country and the walk to a distant platform can take ten minutes.
- Keep the passport on you. It is the identity document for the whole journey, not just the gate.
- Luggage goes on with you. There is no bag check-in; use the racks above the seats and at the end of each carriage. Board early when the carriage is full.
- Nanjing is a two-night city, not a half-day one. The city wall, Fuzimiao, the Ming Xiaoling tomb and the Sun Yat-sen Mausoleum alone fill a full day, and the last trains back to Shanghai leave in the early evening.
- Overnight in Nanjing if the itinerary allows. One night downtown turns a rushed circuit into a normal trip and costs less than a rushed taxi schedule.
Station layouts, exits and transfer times at both ends are covered in the train station guide.
Frequently asked questions
How long is the train from Shanghai to Nanjing?
The fastest G trains make the 301 km in about an hour, with the shortest quoted journey time at 59 minutes. A normal booking runs between 1h 15m and 1h 50m, D trains commonly take around two hours, and conventional trains take three to five hours.
Which station does the train leave from in Shanghai?
Most high-speed trains use Shanghai Hongqiao (上海虹桥). Some use Shanghai Station (上海站), and conventional services can leave from Shanghai South or Songjiang North. Hongqiao and Shanghai Station are far apart, so read the station name on your booking rather than assuming.
Nanjing South or Nanjing Station?
Nanjing South (南京南) takes almost all high-speed trains and has Metro Lines 1, 3, S1 and S3, but it sits south of the historic centre. Nanjing Station (南京站) is north of Xuanwu Lake, closer to the lake and the city wall, and is used by conventional trains and some high-speed services.
How much does a Shanghai to Nanjing train ticket cost?
Second class on the high-speed services starts at about ¥105 on the slower departures and rises on the fastest trains. Conventional trains are cheaper, with hard seats quoted around ¥40–¥50 and sleeper berths from roughly ¥95. Fares are set by China Railway and vary by train, so confirm the price in the 12306 app.
Is there an overnight sleeper between Shanghai and Nanjing?
Conventional trains on this corridor carry sleeper cabins and run through the night, but the trip is only 301 km. A bed costs you three to five hours and drops you at the station before most hotels open check-in, while a high-speed train covers the same ground in about an hour during the day.
How far in advance can I book?
Tickets are released 15 days before departure including the day of purchase, and sales stay open until shortly before the train leaves. Third-party sites may accept a pre-order earlier, but the seat is only issued when China Railway opens the sale window.
Can I visit Nanjing as a day trip from Shanghai?
It is possible and the trains make it easy, but a day trip leaves you roughly seven usable hours in the city. Nanjing rewards more time than that, and one night downtown turns a rushed circuit of the city wall, Fuzimiao and the Sun Yat-sen Mausoleum into a comfortable visit.
Do I need a paper ticket?
No. Your passport is your ticket for the whole journey. It is scanned at the station entrance, at the departure gate and sometimes again at the platform gate. Nothing needs printing or collecting at either end.
What if the train I want is sold out?
Use the free waitlist (候补) on 12306. It fills from cancellations and refunds and only charges you when a seat is confirmed. On this corridor there are more than 300 departures a day, so a different train is often the simpler answer.
Related reading
Nanjing sits on the same line as Suzhou and Hangzhou, so the three cities combine easily into one loop. The train routes index lists every China route page we cover with times and station pairs.
Compiled from China Railway 12306 release and booking rules, and from journey time, station and fare listings cross-checked against TravelChinaGuide, China Airline Travel and Trainspread (checked 30 September 2026). Timetables, fares and departure counts are set by China Railway and change with the season; treat every figure here as indicative and confirm your specific train in the 12306 app.