Skip to content
China for Travelers

Route guide · High-speed rail

Shanghai to Xi'an by High-Speed Train (2026)

1,509 km inland from the Yangtze coast to the old Tang-dynasty capital — about 6h on the fastest G-trains, 28 a day. Faster by air, but downtown-to-downtown the train is a genuine toss-up — and the only way to break the trip at the Longmen Grottoes.

China for Travelers EditorialUpdated Published Rail data refreshed monthly

FromShanghai 上海
6h1,509 km · G fastest
ToXi'an 西安Xi'an North 西安北站 · Metro 2 / 4
2nd class
¥233 – ¥724
what everyone buys
Frequency
28/day
06:09 – 18:19
Train types
G
G = fastest
Flight
~2–2.5h
a real toss-up

A genuine toss-up on this route~2–2.5h in the air vs 6h – 8h on rails, but the train is downtown-to-downtown with no airport buffer. Take it for the Luoyang stopover or to skip flying.

Check live ShanghaiXi'an trains via Trip.com · English checkout · foreign cards
Editorially reviewedRail data refreshed monthlyAmap routing checked Jun 2026Affiliate links disclosed

The route at a glance

Shanghai Hongqiao (上海虹桥) to Xi’an North (西安北) runs 1,509 km inland — longer than Beijing–Shanghai but slower, because the line threads the populous Yangtze delta and Central Plains with more curves and more stops (typically Nanjing, Zhengzhou and Luoyang). The fastest scheduled G-train does it in 6h; most run 6h – 8h with several intermediate stops, about 28 a day each way from 06:09 – 18:19. Arriving into Shanghai first? See the Shanghai Hongqiao station guide.

One fact shapes the rest of this page: there is no overnight high-speed service on this corridor — every G departure runs in daylight, so the ride is a full daytime trip either way. Unlike the short Shanghai hops, the honest first question here is not “which station” but train or plane — and on a 6h route the answer is closer than you might expect.

Map of the Shanghai Hongqiao–Xi'an North high-speed rail corridor: 1,509 km from Shanghai Hongqiao Railway Station to Xi'an North Railway Station, 6h on the fastest G-train.
The 1,509 km Shanghai–Xi'an high-speed corridor — about 6h on the fastest G-train, inland to the old Tang capital.

Train vs flight — the honest comparison

This is the one decision worth making before you book. The plane is faster in the air, but on a downtown-to-downtown trip the high-speed train claws most of that back — at six hours it is the shortest of the long-haul corridors and genuinely competitive. Here is the trade laid out plainly:

High-speed trainFlight
Journey time6h fastest (6h – 8h)~2–2.5h in the air
Price (economy)¥233 – ¥724¥700 – 1,200 (est.)
City-centre to city-centreBoth ends are downtown metro stations — no airport transfer.Add ~90 min airport buffer each end; PVG and XIY sit well out of town.
ExperienceA relaxed day watching the country change; power at every seat; you can walk around — and you can break the trip at Luoyang.Over by lunch; nothing to see but cloud, and no stopover.

Fly to save a couple of hours. The plane is roughly ~2–2.5h in the air against 6h on the rails, so if shaving the afternoon matters most, fly — fares sit close enough that the train rarely saves money.

Take the train for the trip itself. It earns its day if you dislike flying, value arriving downtown with no airport transfer at either end, or want to break the journey — most through G-trains stop at Luoyang Longmen (8 km from the Longmen Grottoes) and Zhengzhou, so Shanghai → Luoyang for a day at the grottoes, then Luoyang → Xi’an, is a genuinely good overland itinerary a flight can’t replicate. The air fare above is an editorial estimate, not a live quote; check the day’s flights before deciding.

Whichever you choose, all Shanghai–Xi’an high-speed services arrive at Xi’an North 西安北站 on Metro Lines 2 & 4 — not the old downtown Xi’an station, which handles conventional trains only. Full layout and exits are in the Xi’an North station guide.

Classes and price

Fares are dynamically priced, so the exact number depends on the train and how far ahead you book — and on a six-hour daytime ride the class you pick actually matters:

ClassPriceWorth it?
Second classmost buy¥233 – ¥7243+2 seating, power at every seat — fine for six hours; bring food, the trolley is limited on this route.
First class¥1094 – ¥11812+2 seating, noticeably more legroom — the one upgrade genuinely worth it on a daytime trip this long.
Business class¥2159 – ¥2319Lie-flat pods — luxurious, but at this price most travelers would simply fly instead.

Pricing tip: the second-class band on this route is wide because slower multi-stop services and off-peak departures are discounted well below the fast daytime G-trains. If you are price-sensitive and not in a hurry, the cheapest fares are mid-week, mid-day, and the longer-routing trains.

What's waiting in Xi'an

Nobody does Xi’an as a day trip from Shanghai — at a full daytime ride each way it is an overnight-plus destination, and most travelers give it two or three nights. The headline is the Terracotta Army, a full half-day out east; back in town the Ming-era city wall loops 13.7 km and you can cycle the top, the Muslim Quarter is the evening street-food run, and the Tang-dynasty Big Wild Goose Pagoda anchors the south with its nightly fountain show.

A typical plan: Day 1 city wall + pagoda evening, Day 2 full-day Terracotta Army + Muslim Quarter, optional Day 3 the Hua Shan day trip (30 min by HSR). Start with the Xi’an city guide and where to stay in Xi’an to pick a base inside or beside the wall. Onward by rail, the classic next leg is Xi’an → Chengdu — Terracotta Army to pandas.

How to book with a foreign passport

12306 English app — the official China Railway channel: face-value fares, no booking fee. The trade-off is hassle — passport registration must be approved before you can buy (often slow), and customer service is Chinese-first and limited if a booking goes wrong.

Trip.com ↗ — the same China Railway seats, booked in English with a foreign Visa or Mastercard, no verification wait and 24/7 multilingual support. Prices track 12306, and with new-customer promotions Trip often comes out level or cheaper. As China’s largest OTA you can also add hotels, attraction tickets and tours to the same trip. See the booking walkthrough.

Book a few days ahead — with only ~28 trains a day on a six-hour route, the fast daytime departures sell first; tickets open 15 days out. The name and passport number on the ticket must match what you present; e-tickets are scanned at the gate, no paper pickup needed.

Book on Trip.comNASDAQ: TCOM

The international arm of Ctrip — one of the few platforms selling real China Railway tickets in English, to a foreign passport and card. (Is it legit? — 12306 vs Trip.com.)

Search ShanghaiXi'an
Real 12306 seat inventory, not a reseller markup English checkout · passport real-name Payment stays on Trip.com

Booking through our Trip.com links costs you nothing extra and helps fund our independent research — we earn a small commission. How we’re funded.

Arrived at Xi'an North — getting to your hotel area

Xi'an North Railway Station (西安北站) sits in the far north of the city, about 12–15 km from the walled centre, so plan on 30–45 minutes onward. Metro Line 2 from the underground concourse is the spine into the old city; Line 4 runs south to the pagoda district. The times below are for the three areas foreign visitors most often base in. Picking an area first? See where to stay in Xi’an.

Hotel areaMetroTaxi / DiDi
City Wall / Bell Tower 钟楼 (walled centre)Metro Line 2 direct → Zhonglou. ~38 min, ¥6.¥40–55, ~34 min (10.3 km)
Muslim Quarter 回民街 (street food)Metro Line 2 → Zhonglou (~38 min, ¥6), then a 7-min walk west through Beiyuanmen.¥40–55, ~42 min (drop at the Drum Tower; the Quarter is pedestrianized)
Big Wild Goose Pagoda 大雁塔 (south)Metro Line 4 direct → Dayanta. ~60 min, ¥7. (No line change.)¥60–80, ~48 min (22 km via the ring road)

Metro and driving distances and taxi times via Amap (高德地图) routing, checked 2026-06-14; fares are typical meter estimates (flagfall ¥9 for 2 km, then ~¥2.3/km). The Line 2 ride to the Bell Tower is ~30 min; most of the door-to-door time is the long internal walk out of Xi’an North. For getting around once you arrive, see the DiDi guide and the Xi’an subway guide.

Frequently asked questions

How far is Shanghai from Xi'an?

About 1,509 km (938 miles) inland to the old Tang-dynasty capital.

How do I get from Shanghai to Xi'an?

By high-speed train or by air. G-trains run Shanghai Hongqiao to Xi'an North about 28 times a day, taking ~6 hours (book on the official 12306 app or on Trip.com in English). Flights are about 2h 30m.

How long is the flight from Shanghai to Xi'an?

About 2h 30m in the air versus ~6 hours on the train. The flight is faster; the train is the relaxed downtown-to-downtown option and can break the trip at Luoyang for the Longmen Grottoes.

How long is the Shanghai to Xi’an train?

The fastest G-trains do Shanghai Hongqiao to Xi’an North in about 6 hours. Most services run 6–7 hours with several intermediate stops (Nanjing, Zhengzhou, Luoyang); the slowest are around 8 hours. There is no faster scheduled rail option — the bottleneck is distance, 1,509 km.

Is it better to fly or take the train from Shanghai to Xi’an?

It is close. Air time is ~2h30m and door-to-door roughly 5.5 hours, versus ~6–7 hours by train — and once you add airport buffers and the city-centre-to-city-centre advantage of rail, the two land near a toss-up. Take the train if you dislike flying, want to break the journey at Nanjing or Luoyang, or value arriving downtown with no airport transfer; fly if shaving a couple of hours matters most. Prices are similar once you book the flight a week or two out.

How much is a Shanghai to Xi’an train ticket?

Second class runs roughly ¥515–¥724 on the standard fast G-trains, with cheaper fares on slower or off-peak services. First class is ¥1,094–¥1,181 and business class ¥2,159–¥2,319. Fares are dynamically priced since 2024 — weekends and holidays trend high.

Does the Shanghai to Xi’an train stop at Luoyang?

Most through G-trains stop at Luoyang Longmen, 8 km from the Longmen Grottoes, and at Zhengzhou. This is the practical way to do Shanghai → Luoyang → Xi’an as one overland trip, breaking at the grottoes for a day.

Which Xi’an station do trains from Shanghai use?

All high-speed trains arrive at Xi’an North (西安北站), not the old downtown Xi’an station. Xi’an North is on Metro Lines 2 and 4; about 30 minutes to the Bell Tower in the walled centre.

How early should I book Shanghai to Xi’an tickets?

Tickets open 15 days before departure. With only 28 trains a day on a 6-hour route, the fast daytime departures sell out faster than the Beijing–Shanghai corridor. Book 3–7 days ahead, and the moment the window opens for holidays.

Verification scope

Route data — distance, journey time, fare bands and daily frequencies — is sampled from China’s national rail system and refreshed monthly. The Xi’an North arrival distances and taxi times are from Amap (高德地图) routing, checked 2026-06-14.

Flight figures are an editorial estimate, not a live quote — we do not sell flights and there is no air fare in our rail data. The ~2–2.5h air time and ¥700 – 1,200 fare are indicative; check the day’s flights before deciding.

Confirm before booking: exact schedules and fares vary by train and season under dynamic pricing — and all Shanghai–Xi’an high-speed trains arrive at Xi’an North (西安北), not the older central Xi’an Station.

Plan the rest of your trip

Everything you need at the Xi’an end, plus where the rails go next.