Short answer
The fast way from Shanghai to Guilin is a daytime G train from Shanghai Hongqiao to Guilin North. Direct services take about 9 hours, and the quickest departures cover the 1,520 km in a little over 7. You leave in the morning and arrive in time for dinner.
If you would rather not spend a day watching the countryside, the overnight alternative is a D-series sleeper leaving Shanghai South in the late morning and reaching Guilin North around 4am — roughly 16 hours, with a berth instead of a seat. Conventional overnight trains on the same corridor take longer, sometimes much longer.
Tickets open 15 days before departure. Book with your passport on 12306 or through an English-language agent, and re-check the timetable for your date, because train sets and departure times on this corridor are adjusted between seasons.
Which stations you actually use
Two cities, four station names worth knowing before you buy. Getting this wrong costs you a cross-city taxi, and Shanghai's two stations are on opposite sides of the river.
| City | Station | Used by |
|---|---|---|
| Shanghai | Shanghai Hongqiao | Daytime G high-speed trains |
| Shanghai | Shanghai South | Overnight D sleepers and conventional trains |
| Guilin | Guilin North | Most high-speed trains, including from Shanghai and Shenzhen |
| Guilin | Guilin Station (central) | Some high-speed services; closest to the city centre |
Guilin North sits north of the centre and feeds the Guiyang–Guangzhou high-speed line, which is why it carries the Guangzhou and Shenzhen services. Guilin Station is the older central stop, handy for the Two Rivers and Four Lakes area and for the Li River hotels. A third station, Guilin West, handles a smaller number of trains.
The daytime high-speed run
Guilin is a long way from the coast, so the daytime trains are the ones most visitors end up on. The routing runs southwest through Hangzhou and Nanchang towards Changsha, then down the line into Guangxi.
- Departure window: morning departures cluster between roughly 07:00 and midday, which is deliberate — the trip is built to land you in Guilin before the evening.
- Journey time: about 9 hours on the direct services, and a little over 7 on the fastest departures. Trains that make more stops take longer.
- Arrival station: Guilin North on most services, Guilin Station on some.
- Frequency: a handful of direct departures daily rather than an hourly service. Plan the rest of your day around the train you get.
Nine hours in a seat is a long time, and the seat class you pick decides whether it feels long. See train seat classes in China for what the difference between second and first class actually buys you on a full day of travel.
The overnight sleeper alternative
Overnight trains on this corridor leave from Shanghai South, not Hongqiao. The useful ones are the D-series sleepers that pull out in the late morning and reach Guilin North around 4am the following day — about 16 hours, and you wake up roughly where you meant to be.
Conventional overnight trains also work this line, but check what you are buying: some take considerably longer, and arrivals can fall in the middle of the night when little is open in Guilin. Berth types, upper and lower, are set out in our guide to sleeper trains in China.
Seat classes on this route
The high-speed trains carry three classes. The overnight sleepers use a different set of names entirely, which is the most common source of confusion when comparing prices.
| Class | On which train | What it feels like for a 9-hour trip |
|---|---|---|
| Second class | Daytime G trains | Three seats each side of the aisle. Fine for a normal journey, cramped by hour eight. |
| First class | Daytime G trains | Four seats across, wider and quieter. The usual choice for a trip this long. |
| Business class | Daytime G trains | Lie-flat-ish recliners in small cabins. It costs multiples of second class. |
| Berths (upper and lower) | Overnight D sleepers | Sleeper compartments instead of seats. Lower berths cost more and are easier to sit up in. |
| Hard and soft sleeper | Conventional overnight trains | Six-berth open bays or four-berth compartments. Cheaper, slower, more social. |
Booking with a foreign passport
Two channels do the job. The official 12306 app has an English interface and accepts a foreign passport as an ID type; third-party agents are the fallback when a foreign card declines at checkout, which is the step that fails most often.
- Finish verification before the window opensRegister on 12306 with an email address, then complete the passport, mobile and email checks. In 2026 these are largely automated and clear in minutes, but they can take up to about 24 hours, so leaving it until 15 days out is cutting it fine.
- Enter your passport name exactlyName and passport number must match the document you will board with. A middle name dropped here is the classic reason a gate will not read your passport later.
- Buy 15 days aheadSales open 15 days before departure, Beijing time. If your date is further out, agents advertise a reservation service for 16 to 60 days ahead that buys automatically when sales begin.
- Have a payment method that works12306 takes Alipay and WeChat Pay, both of which can be funded from a foreign card, plus some international cards directly. If payment fails, switch channel rather than re-attempting the same card.
- Board paperlessTap the passport used for the booking at the gate. Not every gate reads a foreign passport, so allow a few extra minutes for a staffed lane — the detail is in our train tickets guide.
If the app is the part you find awkward, the 12306 English walkthrough covers registration and the booking screens step by step.
What a ticket costs
Chinese rail fares are priced by distance and class, then re-set with the timetable, so a figure quoted in a blog post a year ago is a rough guide at best. What is stable is the shape of the pricing.
| Option | Relative cost | Notes |
|---|---|---|
| Second class, daytime G | Base | Several hundred yuan on this line. The reference price for the route. |
| First class, daytime G | Roughly 60 percent more | The comfort upgrade most long-distance travellers take. |
| Business class, daytime G | Multiples of second class | Priced for business travel, not for saving a day. |
| Sleeper berth | Broadly between the seat classes | Upper and lower berths are priced differently. |
Treat every number as an estimate and open 12306 or your agent for the live price on your date. Nobody online, this page included, can promise the fare you will see.
On board, and on arrival
Bring your own food for a nine-hour trip. Trolley service exists and the dining car on Chinese high-speed trains is limited; a station-bought lunch travels better. Hot water is available at the end of each carriage, which is what the instant noodles and tea flasks around you are for.
Luggage goes on the rack above your seat or in the space at the carriage ends. Sizes and what is restricted are set out in the luggage rules. Arriving at Guilin North, taxis queue outside and ride-hailing apps work; from Guilin Station you can walk to parts of the centre.
For Karst scenery, most travellers carry straight on to Yangshuo rather than staying in the city — see the Guilin to Yangshuo guide for how the connection works.
Frequently asked questions
Is there a direct high-speed train from Shanghai to Guilin?
Yes. Daytime G trains run from Shanghai Hongqiao to Guilin North without a change, generally a handful of departures each day. A few services use Guilin Station in the city centre instead. Confirm the exact stops on 12306 for your date, because the set changes between seasons.
How long is the train from Shanghai to Guilin?
Direct high-speed trains take about 9 hours, and the quickest departures run a little over 7 hours. Overnight D sleepers from Shanghai South take roughly 16 hours and arrive at Guilin North around 4am the next morning.
Can I take an overnight sleeper from Shanghai to Guilin?
Yes. D-series overnight sleepers leave Shanghai South in the late morning and reach Guilin North around 4am the next day, roughly 16 hours later. Conventional overnight trains on the same corridor take longer, and some terminate at the central Guilin Station rather than Guilin North.
Which Shanghai station does the Guilin train leave from?
Daytime high-speed trains use Shanghai Hongqiao. Overnight sleepers and conventional trains use Shanghai South. Check the station printed on your ticket rather than assuming, since the two are on opposite sides of the city.
How far in advance can I book a Shanghai to Guilin train?
China Railway opens sales 15 days before departure. Third-party booking agents advertise a reservation service that holds a request from 16 to 60 days ahead and buys automatically when sales open. Finish your 12306 verification before the window opens.
Can I book with a foreign passport on 12306?
Yes. Register with an email address, then complete passport, mobile and email verification. Verification is largely automated and usually clears within minutes, though it can take up to about 24 hours, so do it well before your booking window opens.
How much does a Shanghai to Guilin train ticket cost?
Fares are priced by distance and seat class and are re-set with the timetable. Second class on this line has historically sat in the several-hundred-yuan band, with first class roughly 60 percent more and business class much higher again. The price shown in the app when you book is the one that counts.
Do I need a paper ticket for this route?
No. Boarding is paperless on high-speed services: you tap the passport used for the booking at the gate. Not every gate reads a foreign passport, so leave a few extra minutes to use a staffed lane. Carry the physical passport, not a photo of it.
Which Guilin station is closer to Yangshuo?
Both Guilin North and Guilin Station connect onward to Yangshuo on the Guiyang-Guangzhou high-speed line, a ride of under an hour. Guilin North also sends high-speed trains straight to Yangshuo, so you can continue without entering the city.
Is the train better than flying from Shanghai to Guilin?
The train leaves and arrives in the city and avoids airport transfers at both ends, which on this length of trip often cancels out the flight time saved. Flying still wins if your only free day is a short one; the rail trip suits travellers who want to see the country go past.
Related reading
If you are still planning the rest of the line, the trains hub lists the corridors by city pair.
Compiled from China Railway 12306 app guidance, English-language booking agents and independent route timetables read in September 2026, and cross-checked across two timetable sources for journey times, station names and the overnight sleeper pattern. Fares, departure times and the mix of train numbers change with each timetable cycle — confirm your date and price on the 12306 app or the official channel before you book. Nothing on this page is financial or legal advice.