Two of the largest cities on earth, 1,318 kilometres apart, connected by a train that does the journey in about four and a half hours for roughly the price of a decent dinner. The Shanghai to Beijing high speed train is the single most impressive piece of infrastructure most visitors to China will use, and it is also the trip people most often get wrong — booking the wrong day, missing the ticket release, turning up at the wrong station, or paying three times the fare for a business-class pod they did not need.
Roughly forty G-category services run each way every day. Second-class fares top out at about ¥669, and the price you pay is whatever 12306 shows when you book. There is no cheap advance fare to chase; the scarce thing is availability, and it disappears fast. This guide covers the timings, the three seat classes and what each actually buys you, the overnight sleeper alternative, how to book on a foreign passport, which station you leave from, and what the journey is like once you are on board.

Table of Contents
- Shanghai to Beijing high speed train: the essentials
- Journey times and which train to pick
- Seat classes: what second, first and business class actually buy
- The overnight sleeper alternative
- Booking the Shanghai to Beijing high speed train
- Which stations, and how to reach them
- The station process, step by step
- What the journey is actually like
- Luggage, food and power
- Train versus flying: the honest comparison
- What people get wrong
- Frequently Asked Questions
Shanghai to Beijing high speed train: the essentials
| Question | Answer |
|---|---|
| Distance | 1,318 km |
| Fastest journey | About 4h18m–4h30m (G32, G10 and a handful of others) |
| Typical journey | 4h30m–6h; the slowest G trains run to 7h30m |
| Services per day | Roughly 40–44 G trains each way |
| Second class | About ¥669 |
| First class | See 12306 for the day’s fare |
| Business class | See 12306 for the day’s fare |
| Overnight sleeper (D train) | 11h50m–12h27m; see 12306 for sleeper fares |
| Shanghai station | Hongqiao (a small number from Shanghai Railway Station) |
| Beijing station | Beijing South (some services now Beijing Fengtai) |
| Booking opens | 14 days before departure (a 15-day window counting the day you buy); check the release time on 12306 |
| Ticket format | E-ticket tied to your passport; no paper ticket needed |
| Top speed | 350 km/h on the through sections |
Three things in that table are worth pulling out before anything else, because they determine whether your trip works.
Second class costs up to about ¥669. The railway raised its published fare ceiling by 20% (to about ¥803) from 26 May 2026, though the fares actually charged were initially unchanged, so confirm the price on 12306 when you book. The variation is between train numbers and how many intermediate stops they make, not between booking dates. Nobody gets a better fare by booking earlier — they get a seat, which is the actual scarce commodity.
Tickets appear 15 days out, at 08:00 Beijing time, and not before. This is the single most important operational fact about Chinese rail. There is no six-month advance window. If you are planning a trip four months ahead, you cannot book this train yet, and no agency can do it for you either — they are all reselling from the same system.
Under five hours, take the train. This route is comfortably inside that. Door to door, including the airport journeys and security at both ends, the train beats the plane on this corridor for almost everyone.
Journey times and which train to pick
The headline “four and a half hours” hides a wide spread. The fastest services stop two or three times; the slowest stop a dozen times and take three hours longer for the same money. Choosing badly costs you an afternoon.
| Service type | Journey time | Stops | Worth it? |
|---|---|---|---|
| Flagship non-stop-ish (e.g. G32, G10) | 4h18m–4h30m | 0–2 | Yes — book these first |
| Standard fast G | 4h30m–5h30m | 3–6 | Perfectly fine |
| Slower G | 5h30m–6h30m | 7–10 | Only if nothing else |
| Slowest G | Up to 7h30m | 12+ | Take an earlier train instead |
| Overnight D sleeper | 11h50m–12h27m | Several | Saves a hotel night |
The practical approach: filter by duration rather than departure time when you book. A 08:00 departure arriving at 15:30 is worse than a 09:00 departure arriving at 13:30, and booking systems do not sort this way by default.
First and last departures are roughly 06:30 and 19:30 from Hongqiao, with the densest cluster between 07:00 and 10:00. If you want a full day at the other end, take something before 08:00; if you want a relaxed morning, the 10:00–11:00 departures still land you in Beijing mid-afternoon.
Note the direction of travel matters for one thing only: arriving into Beijing South at 21:00 means a metro journey across an unfamiliar city late at night. Arriving into Hongqiao at 21:00 is easier, because getting around Shanghai late is straightforward and taxis are plentiful.
Seat classes: what second, first and business class actually buy
Three classes on every G train, and the gap between them is real but not linear. Most visitors should be in second class; a specific minority should upgrade.

Second class — about ¥669. Seats are 3+2 across the carriage width. Reclining, a tray table, a power socket at every seat and a footrest. Legroom is better than economy on a plane and worse than European standard-class rail. Seats rotate to face the direction of travel. For four and a half hours this is entirely fine, and it is what the overwhelming majority of Chinese travellers use. Seat letters run A, B, C, D, F — there is no E — with A and F at the windows.
First class. Seats 2+2, noticeably wider, more recline, a proper footrest, more legroom, and a quieter carriage because there are fewer people in it. The honest verdict: worth it if you are tall, travelling on a busy holiday weekend when second class will be full and noisy, or working on the way. Not worth it purely for comfort on a four-hour trip if money matters.
Business class. Arranged 1+2, seats recline fully flat, a hot meal and drinks are included, and there is a separate lounge at the major stations. It is genuinely excellent and costs far more than second class. Worth it if you are arriving straight into a meeting, if you want to sleep, or if the price simply does not matter to you. Otherwise it is a lot of money to lie down for four hours in daylight.

Some Beijing–Shanghai services carry a designated quiet carriage. Where one does not exist, expect speakerphone conversations and video watched without headphones — this is normal in China and not considered rude. If that would bother you, the quiet carriage or first class is the fix.
The overnight sleeper alternative
Less known and genuinely useful: D-category overnight trains run the same corridor in about twelve hours, leaving mid-to-late evening and arriving after breakfast. Sample services depart Beijing around 19:10 and 21:20, arriving in Shanghai at roughly 07:30 and 09:25, with equivalent southbound and northbound patterns.
The maths is straightforward. A sleeper berth replaces a hotel night as well as the daytime fare, and 12306 shows the berth prices. You get a lockable four-berth soft-sleeper compartment with proper bedding, or an open six-berth hard sleeper for less. The first-class sleeper is a two-berth compartment.
| Day G train | Overnight D sleeper | |
|---|---|---|
| Duration | 4h18m–6h | 11h50m–12h27m |
| Second-class fare | About ¥669 (seat) | See 12306 (berth) |
| Costs you | Half a day | A night’s sleep, variable quality |
| Saves you | Nothing | A hotel night |
| Comfort | Reliable | Depends heavily on your compartment |
| Best for | Almost everyone | Tight itineraries, light sleepers excepted |
The catch is that Chinese sleeper compartments are shared with strangers of either sex, lights go out around 22:00, and the carriage is not quiet before then. If you sleep badly on trains you will arrive in Shanghai tired and will have saved nothing. If you sleep anywhere, it is one of the better-value nights in Chinese travel.

Booking the Shanghai to Beijing high speed train
Two routes, and both work on a foreign passport. The choice is between a small saving and a smoother checkout.
12306 — the official China Railway system. It now accepts foreign passports directly: register with your passport number, no Chinese phone number and no Chinese bank account required. It takes Visa, Mastercard, JCB, Diners Club and UnionPay, plus linked Alipay and WeChat Pay. American Express is not accepted. Identity verification is automated and usually takes minutes, though it can occasionally take up to 24 hours to sync against immigration records — so register a few days before you need to buy, not at 07:55 on release morning.
Trip.com — the agency route. Sells the same seats from the same inventory at face fare plus a service fee, typically ¥20–40 per ticket. Better English, a checkout that is far more tolerant of foreign cards, and support in English if something goes wrong. Refunds route through the agency rather than the railway, which adds a step. For most visitors the fee is worth it.
The release mechanics, which matter more than the platform. Tickets go on sale 14 days before departure, because the 15-day sales window counts the day you buy; the release time is set by the departure station, so check it on 12306. For the Shanghai–Beijing corridor there is enough capacity that ordinary weekdays stay available for days afterwards, but Friday evenings, Sunday afternoons and anything touching a public holiday can clear within minutes. If your dates fall in Chinese New Year or the October National Day week, be at your screen a few minutes before the release time.
Tickets are e-tickets bound to your passport number. There is nothing to collect and no ticket office to visit — the passport is the ticket. Make sure the passport number on the booking exactly matches the one you will travel on, including any letters. A mismatch is not fixable at the gate.

Have Alipay or WeChat Pay set up before you try any of this; both make the checkout dramatically easier, and the essential apps guide covers the full stack you want on your phone before arriving.
Which stations, and how to reach them
In Shanghai: Hongqiao Railway Station, for the great majority of services. It is on metro Lines 2, 10 and 17, and physically attached to Hongqiao Airport Terminal 2. Allow 40–50 minutes from the Bund on Line 2 and 35–45 minutes from the former French Concession on Line 10. A taxi from central Shanghai is ¥70–100 and 30–40 minutes without traffic, which is not a safe assumption at rush hour.
A small number of Beijing services, mostly the conventional overnight ones, use Shanghai Railway Station instead — Lines 1, 3 and 4, about ten minutes from People’s Square and considerably more central. Check which one your ticket says. They are 12 kilometres apart and confusing them costs you the train.
Coming straight from Pudong Airport, allow 60–75 minutes to Hongqiao on Line 2, or take the Maglev to Longyang Road and change. The Hongqiao airport guide covers the layout of the combined airport and rail complex, which is large and genuinely confusing on a first visit.

In Beijing: Beijing South Station for nearly everything, about six kilometres south of Tiananmen Square and roughly 40 minutes into the centre on the subway. Some services now use Beijing Fengtai, reopened in 2022 and further out again. A handful of conventional trains use Beijing Station in the centre. As in Shanghai, read your ticket.
The station process, step by step
Chinese railway stations work more like airports than European stations, and the sequence is fixed.
- Arrive 40 minutes early at Hongqiao. It is a very large building and the queues are real. Twenty-five minutes is enough at a small station; it is not enough here.
- Bag scan at the entrance. X-ray for everything, a handheld wand for you. Liquids are fine; lighters and power banks over 100 Wh are not.
- Passport check into the departure hall. Your passport is scanned against the booking. Foreign passports occasionally need the staffed lane rather than the automatic gate — look for the counter marked for manual checks.
- Find your gate on the boards. Departure boards list train number, destination, departure time and gate number. They are bilingual. Your train appears about 30 minutes out.
- The gate opens roughly 15 minutes before departure and closes 3–5 minutes before it leaves. This is absolutely enforced. Being on the concourse when the gate closes means you have missed the train, regardless of how close you were standing.
- Board by carriage number. The platform floor is marked with carriage positions; stand at yours. Your carriage and seat are printed on the booking confirmation and shown in the app.
- Scan the passport again on exit at your destination.
English signage on the high-speed network and at the major stations is good. Staff English is patchy but functional at Hongqiao and Beijing South. If you need to ask something complicated, the language barrier guide covers what actually works, and a translation app with camera OCR handles the rest.
What the journey is actually like
Smoother and quieter than most people expect. The trains are modern CR400 Fuxing sets, they hold 350 km/h for long stretches across the North China Plain, and the ride is stable enough to work on a laptop the whole way. There is a speed display in each carriage vestibule, which becomes mildly addictive.
The scenery, honestly, is not the reason to do this. Between Nanjing and Jinan you get several hours of flat agricultural land, wind turbines and new towns. It is interesting for about forty minutes. Bring something to read.
Intermediate stops are short — often two minutes, occasionally one. If you are getting off at Nanjing or Jinan, be at the door before the train slows. Announcements are made in Mandarin and English on all G services.
Practical notes from the carriage: the toilets are Western-style at one end and squat at the other, and are cleaned during the journey; there is a boiling-water dispenser in every carriage, which is why so many passengers carry instant noodles and a tea flask; and phone signal along the route is good, with the occasional dropout in tunnels. There is no reliable train wi-fi to plan around.
Luggage, food and power
Luggage. There is no check-in and no weighing at the gate. The official allowance is 20 kg per adult and 10 kg per child, with a size limit of 130 cm for the sum of the three dimensions on the high-speed network — in practice this is very rarely enforced for ordinary suitcases. Bags go on the overhead racks, which take a cabin-sized case, or in the larger racks at the ends of each carriage, which take anything. Get on early if you have a big case; the end racks fill up. Nothing is tagged, so keep valuables with you.
Food. There is a buffet counter and a trolley, and both are mediocre — microwaved tray meals at ¥45–65, instant noodles, snacks, beer. Business class includes a hot meal. The better plan is to buy at the station: Hongqiao’s concourse has a good range of bakeries, noodle shops and convenience stores at normal prices, and the hot-water dispenser on board turns a ¥12 pot of noodles into a decent lunch.
Power. A socket at every seat in every class, Chinese two- and three-pin, which also takes flat two-pin plugs. A universal adapter is on the Shanghai packing checklist for good reason. Power banks are allowed up to 100 Wh; anything larger will be pulled at the scanner.
Train versus flying: the honest comparison
| High-speed train | Flight | |
|---|---|---|
| Advertised duration | 4h18m–6h | 2h15m |
| Realistic door to door | 5h30m–7h | 5h30m–7h |
| Typical fare | About ¥669 | ¥600–1,600 |
| Departs from | Hongqiao, 35–45 min from the centre | Hongqiao or Pudong, 30–75 min |
| Arrives at | Beijing South, 40 min from the centre | Beijing Capital or Daxing, 60–90 min |
| Reliability | Very high; delays are rare and short | Poor — Chinese domestic delays are routine |
| Luggage | Carry on what you like | Check-in, fees, waiting at the belt |
| Comfort | Better than economy, by some distance | Standard short-haul economy |
| Verdict | The right choice for almost everyone | Only if the fare is genuinely low |
The two-hour flight is a fiction once you add getting to Pudong, being there ninety minutes early, and the journey from a Beijing airport into the city. Add the delay risk — Chinese domestic aviation is genuinely delay-prone, particularly out of Pudong in the summer thunderstorm season — and the train wins on the metric that matters, which is when you actually arrive.
The rule the rest of this site uses: under five hours take the train, over eight hours fly, and think about it in between. Beijing is comfortably in train territory. Chengdu, at eleven hours by rail, is not. If you are weighing the two cities as destinations rather than as a journey, our Shanghai versus Beijing comparison is the place to start.

What people get wrong
Trying to book months ahead. The system does not sell tickets more than 15 days out. Travellers assume the site is broken, or pay an agency a premium for a “reservation” that is nothing of the kind.
Booking by departure time rather than duration. Two trains leaving an hour apart can arrive three hours apart. Always check the arrival time.
Turning up at the wrong Shanghai station. Hongqiao and Shanghai Railway Station are twelve kilometres and forty minutes apart. Read the ticket.
Arriving twenty minutes before departure at Hongqiao. Between the bag scan, the passport check and the walk to the gate, twenty minutes is not enough. The gate closes three to five minutes before departure and there is no discretion.
Assuming the fare will drop. It will not. Chinese rail fares are fixed. Waiting achieves nothing except a worse seat.
Booking with a passport number you then change. If you renew a passport between booking and travelling, the ticket is unusable. Rebook.
Using American Express on 12306. It is not accepted. Use another card, or book through Trip.com.
Expecting the visa position to be simple. If you are in China on the 240-hour visa-free transit, Beijing and Shanghai are both inside the permitted zone and cross-province travel between them is allowed — but you still need that onward ticket to a third country or region within the window. Our 240-hour transit guide sets out the conditions, and the visa and entry requirements guide covers the alternatives.
Booking a same-day international connection off the train. The train is reliable, but Beijing’s airports are not close to Beijing South. Leave three hours.
Frequently Asked Questions
How long does the train from Shanghai to Beijing take?
The fastest G-category services do it in about 4 hours 18 minutes to 4 hours 30 minutes. Most take between four and a half and six hours depending on the number of intermediate stops, and the slowest G trains run to around seven and a half hours. Overnight D-category sleepers take 11h50m to 12h27m.
How much does the Shanghai to Beijing train cost?
Second class is up to about ¥669. First class, business class and the sleeper berths are priced by train, and 12306 shows each fare. The railway raised its published fare ceiling by 20% from 26 May 2026, so confirm the price on 12306 when you book.
When can I book Shanghai to Beijing train tickets?
14 days before departure, because the 15-day sales window counts the day you buy; check the release time on 12306. There is no earlier window, no advance-purchase discount and no way for an agency to get in sooner — everyone draws from the same inventory. Register your account and verify your passport a few days beforehand, since verification can occasionally take up to 24 hours.
Can foreigners book Chinese train tickets online?
Yes. The official 12306 system accepts foreign passports with no Chinese phone number or bank account required, and takes Visa, Mastercard, JCB, Diners Club, UnionPay and linked Alipay or WeChat Pay — but not American Express. Trip.com resells the same seats with a small service fee, better English and a more forgiving checkout for foreign cards.
Which station does the Beijing train leave from in Shanghai?
Almost all high-speed departures use Shanghai Hongqiao Railway Station, on metro Lines 2, 10 and 17 and attached to Hongqiao Airport Terminal 2. A small number of services, mostly conventional overnight trains, leave from the more central Shanghai Railway Station on Lines 1, 3 and 4. The two are twelve kilometres apart, so check your ticket.
Is first class worth it on the Shanghai to Beijing train?
For most people, no. Second class is 3+2 seating with a power socket, tray table and decent legroom, and it is comfortable for four and a half hours. First class at roughly 1.7 times the fare buys 2+2 seating, more space and a quieter carriage — worth it if you are tall, working, or travelling on a busy holiday weekend when second class will be full.
Do I need to print my ticket?
No. Chinese rail is entirely e-ticket now, and the ticket is bound to your passport number. You scan the physical passport at the station entrance, at the departure gate and on exit at the other end. There is nothing to collect and no ticket window to queue at.
How early should I arrive at the station?
Forty minutes at Hongqiao and Beijing South, which are both very large. You need time for the bag scan, the passport check into the departure hall and the walk to your gate. The gate opens about fifteen minutes before departure and closes three to five minutes before the train leaves, and that closure is enforced without exception.
What is the luggage allowance on Chinese high-speed trains?
Officially 20 kg per adult and 10 kg per child, with a 130 cm limit on the sum of the three dimensions. In practice nothing is weighed or measured for ordinary suitcases. There is no check-in — bags go on the overhead racks or in the larger racks at the ends of each carriage. Board early if you have a large case.
Is there food on the Shanghai to Beijing train?
Yes, but it is mediocre: a buffet counter and a trolley selling microwaved tray meals at ¥45–65, instant noodles, snacks and beer. Business class includes a hot meal. Buy at the station instead — Hongqiao’s concourse is much better and normally priced — and use the boiling-water dispenser in every carriage.
Is the overnight sleeper worth taking instead?
If you sleep well on trains, yes. A sleeper berth saves a hotel night as well as the daytime fare, and you arrive after breakfast. The compartments are shared with strangers and lights go out around 22:00. If you sleep badly you will save money and lose a day.
Can I take the train to Beijing on a visa-free transit?
Yes. Both Shanghai and Beijing are inside the 24 provinces and municipalities covered by the 240-hour visa-free transit scheme, and travel between them is permitted. You still need a confirmed onward ticket to a third country or region within your window, and you must register with local police at each new city — hotels do this automatically at check-in.
Book at the fifteen-day mark, choose by arrival time rather than departure, take second class unless you have a reason not to, and give yourself forty minutes at Hongqiao. Once you have done it once, the rest of the network stops feeling intimidating — Suzhou at 25 minutes and Hangzhou at 45 use exactly the same mechanics, and our day trips guide ranks the rest by journey time. If Beijing is one stop on a longer route, our guide to travelling China from Shanghai covers flights, onward rail and multi-city planning. For fares, timetables and the sleeper details in more depth, Seat 61’s Beijing–Shanghai page is the best independent English reference, and TravelChinaGuide’s train section carries current schedules.