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.
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 four and a half hours; check the timetable on 12306 |
| Typical journey | 4h30m–6h; the slowest G trains run to 7h30m |
| Services per day | Frequent G trains each way; 12306 shows the day’s timetable |
| 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) | Overnight; see 12306 for each train’s times and sleeper fares |
| Shanghai station | Usually Hongqiao; check the station on your ticket |
| Beijing station | Usually Beijing South; check your ticket, as Beijing Fengtai is also in use |
| 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 go on sale 14 days before departure, and not before. The 15-day sales window counts the day you buy, and each departure station sets its own release time, so look it up on 12306. This is the single most important operational fact about Chinese rail. 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 make few stops and the slowest make many more, for the same money. Choosing badly costs you an afternoon.
| Service type | Journey time | Stops | Worth it? |
|---|---|---|---|
| Flagship non-stop-ish | Quickest | Fewest | Yes — book these first |
| Standard fast G | A little longer | A handful | Perfectly fine |
| Slower G | Longer again | More | Only if nothing else |
| Slowest G | Longest | Most | Take an earlier train instead |
| Overnight D sleeper | Overnight | 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.
Trains leave Hongqiao from early in the day, and 12306 lists the first and last departures for your date. If you want a full day at the other end, take the earliest train you can face. For a relaxed morning, sort the results by arrival time and pick a later departure that still gets you into Beijing when you need to be there.
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 typically 3+2 across the carriage width. Reclining, a tray table and a footrest, with charging points that vary by train model. 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 are typically 2+2 rather than 3+2, so there is more room around you; the exact seat and its extras depend on the train model. 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. The top seat class, and it costs far more than second class. What the seat and service include depends on the train, so read the details for your service before paying. Worth it if you are arriving straight into a meeting or if the price simply does not matter to you. Otherwise it is a lot of money 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 useful: D-category overnight trains run the same corridor, leaving in the evening and arriving the next morning. Times differ by train and direction, so search your date on 12306 to see which ones run.
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. On these overnight D trains the first-class sleeper has four berths to a compartment as well.
| Day G train | Overnight D sleeper | |
|---|---|---|
| Duration | From about four and a half hours | Overnight |
| 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 you will usually share the compartment with strangers. 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. Its published payment options include Visa, Mastercard, JCB and Diners Club, plus Alipay and WeChat Pay. Identity verification has to be complete before you can buy. It is often automatic; if not, upload a photo of your passport’s information page for manual review, or take the passport to a station ticket office. Either way, do it well before you need to buy, not 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. Our guide to Shanghai’s main railway stations walks through each one’s layout. It is on metro Lines 2, 10 and 17, and physically attached to Hongqiao Airport Terminal 2. Line 2 runs there from the Bund area and Line 10 from the former French Concession; check the journey time from your own station in a metro app. A taxi from central Shanghai is ¥70–100 and 30–40 minutes without traffic, which is not a safe assumption at rush hour.
A Beijing train can also leave from Shanghai Railway Station instead — Lines 1, 3 and 4, and considerably more central. Check which one your ticket says. The two are across the city from each other, on different metro lines, and confusing them costs you the train.
Coming straight from Pudong Airport, ride Line 2 right across the city to Hongqiao, or take the Maglev to Longyang Road and change; either way it is a long trip, so leave a generous margin. The Hongqiao airport guide covers the layout of the combined airport and rail complex, which is large and confusing on a first visit.

In Beijing: Beijing South Station for most high-speed trains, south of the city centre and on the subway. Beijing Fengtai reopened in 2022, so check whether your train ends there instead. 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. Ordinary drinking water is fine, but flammable liquids and some toiletries are restricted. You may carry up to two ordinary lighters, and each clearly marked power bank must be 100 Wh or less.
- 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. Keep an eye on the live board for your gate and any change to it.
- The gate opens shortly before departure and closes a few 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. 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. 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. The better plan is to buy food before you board: Hongqiao’s concourse has plenty of places to eat and shop, and the hot-water dispenser on board turns a pot of instant 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 | From about four and a half hours | 2h15m |
| Realistic door to door | 5h30m–7h | 5h30m–7h |
| Typical fare | About ¥669 | ¥600–1,600 |
| Departs from | Hongqiao | Hongqiao or Pudong |
| Arrives at | Beijing South | Beijing Capital or Daxing |
| 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 14 days before departure. 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.
Paying with a card 12306 doesn’t list. The published international-card options are Visa, Mastercard, JCB and Diners Club. Use one of those, 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 take about four and a half hours, and 12306 shows the exact time for each train. 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 run through the night.
How much does the Shanghai to Beijing train cost?
Second class is up to about ¥669. Other fares vary by train, class and section of the route, and 12306 shows each one. The railway raised its published fares by 20% in 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 advance-purchase discount and no way for an agency to get in sooner — everyone draws from the same inventory. Register your account and finish passport verification well ahead: it is often automatic, and if not you can upload a photo of the passport’s information page for manual review or take the passport to a station ticket office.
Can foreigners book Chinese train tickets online?
Yes. The official 12306 system accepts foreign passports, and its published payment options include Visa, Mastercard, JCB and Diners Club as well as Alipay and WeChat Pay. 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?
Check your ticket. Shanghai Hongqiao Railway Station, the city’s busiest rail hub, is on metro Lines 2, 10 and 17, and its main building is joined to Hongqiao Airport Terminal 2. A Beijing train can also leave from the more central Shanghai Railway Station on Lines 1, 3 and 4, across the city from Hongqiao.
Is first class worth it on the Shanghai to Beijing train?
For most people, no. Second class is typically 3+2 seating with a tray table and decent legroom, charging points depending on the train model, and it is comfortable for four and a half hours. First class buys 2+2 seating and more space at a higher fare, which you can compare on 12306 — 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. Buy food at the station before you board, 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 the next morning. Expect to share the compartment with strangers. 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 as soon as sales open, 14 days out, 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, about half an hour away, and Hangzhou, under an hour on the fastest trains, 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 and TravelChinaGuide’s train section both cover the route in English; confirm final times and fares on 12306.
Photo credits.
Hongqiao ticket gates: 201705 Boarding Gate 12B, 13B of Shanghai Hongqiao Station by MNXANL, CC BY-SA 4.0, via Wikimedia Commons.
Second class on a CRH3C train: Coche Siemens CRH3C de segunda clase by galio, CC BY-SA 2.0, via Wikimedia Commons.