Most travelers flying into China never make it past Beijing and Xi’an. That’s a shame, because about 350 km west of Beijing sits a dusty, underrated city that holds two of the most jaw-dropping sights in northern China. The Yungang Grottoes are a string of 252 caves carved into a sandstone cliff, stuffed with more than 51,000 Buddhist statues — some of them as tall as a five-story building. And an hour south of the city, the Hanging Temple clings to a vertical rock face like something out of a fantasy film. Datong is the perfect 1–2 day heritage stop, and it’s far easier to reach than you’d think.
At a glance
- Where: Datong, Shanxi Province, roughly 2–3 hours by high-speed train from Beijing.
- Top sights: Yungang Grottoes (UNESCO), Hanging Temple (Xuankong Si) on Hengshan, Datong City Wall, Huayan Monastery.
- Best time to visit: Late spring (May–June) and early autumn (September–October) for clear skies and soft light.
- Tickets: Yungang ~120 RMB; Hanging Temple ~100 RMB (climb inside ~100 RMB extra in peak season).
- Time needed: One full day for both grottoes and temple; two days if you want the city sights too.
- Good for: History buffs, photographers, Buddhist art lovers, off-the-beaten-path travelers.
Why Datong deserves a spot on your route
Datong was a capital of the Northern Wei dynasty (4th–6th century) and a key stop on the old Silk Road corridor. That imperial past is exactly why the grottoes and temples here are so staggering — they were bankrolled by emperors, not local villages. The city itself is compact and walkable once you’re inside the reconstructed Ming-era wall, and it pairs beautifully with a longer northern China loop. If you’re building a first China trip, our China travel guide for first-timers covers the logistics that make a side trip like this painless.
Yungang Grottoes: cave after cave of stone Buddhas
The grottoes line a 1 km cliff face west of the city. You enter along a walkway and move from cave to cave, each one guarded by a iron gate and lit just enough to see the carvings. The early caves (1–20) were cut under imperial direction in the late 400s and are the most spectacular: Cave 5 holds a 17-meter seated Buddha, and Cave 6 is a riot of carved pillars and reliefs telling the life story of the Buddha. The later caves are smaller and more weathered, but the sheer density of faces — serene, smiling, fierce, contemplative — is what stays with you.
Light and timing. Come in the morning if you can. The caves face roughly east-southeast, so low morning sun rakes across the sandstone and makes the relief work pop for photography. By midday the cliff is in flat shadow and the shuttle-bus crowds thicken. Weekdays beat weekends, and aim for a day with no wind — the site sits in open country and the wind off the Loess Plateau carries grit.

Tickets and getting in. Buy tickets at the on-site window or, better, through the official WeChat mini-program ahead of time; during national holidays the cap on daily entries can sell out. A golf-cart shuttle runs from the entrance to the cave area (included in most tickets). Budget 2.5–3 hours to see the main caves without rushing. For background on the site’s UNESCO status, the UNESCO World Heritage listing for Yungang has useful detail on the art history.
The Hanging Temple: a temple bolted to a cliff
An hour south of Datong, near the foot of Hengshan (one of China’s sacred mountains), the Hanging Temple does exactly what the name promises. Wooden halls and walkways are cantilevered out from the rock face, supported by wooden beams driven into the cliff, 50 meters above the ground. It was built around 1,500 years ago and mixes Buddhist, Taoist, and Confucian figures under one roof — unusual and worth knowing before you go.
The walkways are narrow and the climb is not for anyone with a fear of heights, but the experience of edging along a temple that seems to defy gravity is unforgettable. In peak season you can pay extra to walk the inner circuit; off-season you may only circle the lower decks. Either way, get there when it opens — tour buses from Datong arrive mid-morning and the single-file walkways bottleneck fast.
Inside Datong: city wall and Huayan Monastery
If you stay a second day, the city itself rewards a slow wander. The Datong City Wall was rebuilt in the last two decades on the original Ming foundations and you can walk the top of it for a full circuit at sunset — the rammed-earth and brick ramparts glow orange and the modern city spreads out behind them. Inside the wall, Huayan Monastery is one of the best-preserved Liao-dynasty temple complexes in the country, with a soaring wooden library pavilion (the Bojiajiaocang) and a hall full of fierce, beautifully painted clay arhats. It’s quieter than the marquee sights and a good place to catch your breath.
How to reach Datong from Beijing or Xi’an
Datong is well wired into the high-speed rail network, which is the comfortable way to arrive.
- From Beijing: Trains run from Beijing North or Qinghe to Datong South in about 2 to 2.5 hours. This is the easiest add-on if Beijing is your entry point — spend a day or two in the capital, then hop the rail west.
- From Xi’an: High-speed trains take roughly 5–6 hours with a transfer (often at Taiyuan or Shijiazhuang). If Xi’an is already on your plan, our Xi’an travel guide explains the hub and how to connect onward.
Book through the official 12306 system or a reseller app; our guide to booking China train tickets on 12306 walks through the account and payment steps foreigners actually need. If you want the broader picture on rail travel here, the high-speed train guide for foreigners is worth a read before you book.
Within Datong, ride-hailing apps and taxis handle the run to Yungang (about 30–40 min from the center) and to the Hanging Temple (about 1 hour south). A private driver for the day is the simplest way to chain both sights plus Hengshan without fuss.
Want the rest of your northern China loop mapped out? A 2-week itinerary strings Datong together with Beijing, Xi’an, and beyond for a logical westbound arc.
A 1–2 day plan that actually works
One-day blitz: Train in early, drop bags at the hotel, taxi to Yungang for the morning (arrive at opening), lunch in the city, then afternoon at the Hanging Temple, and train out that evening or stay the night.
Two-day relaxed version:
– Day 1: Yungang Grottoes in the morning, Datong City Wall walk at sunset, dinner inside the wall.
– Day 2: Hanging Temple and Hengshan in the morning, Huayan Monastery after lunch, train out.
Either way, the best weather window matters more than people admit. Our best time to visit China overview breaks down the regional seasons so you can dodge the worst of the summer heat and the Spring Festival crunch.
Before you go
Datong sits at altitude and gets cold at night even in shoulder season — pack a layer. The grottoes and temple are mostly outdoors, so comfortable shoes and a windbreaker earn their place in your bag. If Datong is one stop on a bigger trip, skim our China bucket-list attractions to see how it slots against the headline sights.
Planning the train leg from Beijing? Lock in Beijing’s headline sights — like the Forbidden City — before you head west to Datong so the whole northern loop flows smoothly.
Datong won’t show up on most China highlight reels, and that’s precisely the point. The Yungang Grottoes and the Hanging Temple are the kind of sights that make you stop mid-sentence — and you’ll have them nearly to yourself compared with the crowds in Beijing. Give it a day or two. It might be the quietest, most memorable stop on your whole trip.
