Why go now?
July is the ideal month to enjoy the long summer days in the Scottish capital. Make the most of the city's natural good looks and formidable heritage before the crowds converge for the Fringe (2 to 26 August; www.edfringe.com) and Royal Tattoo (2 to 24 August; www.edintattoo.co.uk); hotel rates are still reasonable and places to eat and drink are refreshingly accessible.
Edinburgh's Waverley station (1) is served by East Coast Trains, taking around four hours 20 minutes from London King's Cross via Peterborough, York and Newcastle.
CrossCountry runs from Bristol, Birmingham, Leeds and many other towns and cities. ScotRail has trains from across Scotland, as well as the overnight Caledonian Sleeper from London Euston. Times and fares: 08457 48 49 50 or nationalrail.co.uk.
Edinburgh airport, seven miles west, has flights from across the UK. The Airlink 100 bus (0131 555 6363; flybybus.com) departs from outside the terminal at least every 10 minutes for the half-hour journey to Waverley station (1) via Haymarket (2); £3.50 single/£6 return.
The Edinburgh Pass (edinburgh.org/pass) starts working from the airport – it includes a return trip on the Airlink bus, as well as admission to more than 30 attractions; a two-day pass costs £40.
Get your bearings
Edinburgh is a collection of villages that clings to the skirts of the Castle (3), perched atop a volcanic plug. The ancient centre is the Old Town, around the spine of the Royal Mile – which changes its name several times as it runs down from the castle. The south side is a mix of grand institutions and student haunts, while to the north stands the handsome 18th-century New Town. Edinburgh's window on the maritime world is Leith, on the Firth of Forth. The main tourist office (4) is at 3 Princes Street (0845 2255 121; edinburgh.org), part of the Waverley station complex. In July and August it opens 9am to 7pm daily (Sundays from 10am).
The last great Victorian railway hotel to be completed was the North British, which opened in 1902 on Princes Street and is now known as the Balmoral (5) (0131 556 2414; thebalmoralhotel.com). A double with breakfast costs around £300. The rack rate for suite 552, where J K Rowling completed Harry Potter and the Deathly Hallows is £1,275 a night. When she finished on 11 January 2007, the world's most successful writer signed an antique Florentine bust of Hermes – god of travel – that happened to be in the room. It has been preserved there in a glass case. Mere mortals who are hurrying for their trains at Waverley should note that the hotel's clock is deliberately set fast to encourage tardy travellers not to dawdle.
Le Monde (6) at 16 George Street (0131 270 3900; lemondehotel.co.uk) brings the world to Edinburgh, with individually designed and named rooms from Paris and Milan to Havana and Shanghai. Doubles start at around £175, including breakfast.
The best-located budget hotel is the Ibis Edinburgh Centre (7), just off the Royal Mile at 6 Hunter Square (0131 240 7000; ibishotel.com). Advance booking doubles start at £83, excluding breakfast.
Take a hike
The Royal Mile is the collective name for the straggle of streets leading west up to the Castle. Start at the Queen's official residence when she's in Scotland, Holyroodhouse (8). It reopens to the public tomorrow and will welcome visitors from 9.30am to 6pm daily until the end of October (bit.ly/HolyEdi). The £11 admission covers a new exhibition on Mary Queen of Scots, a former resident.
When power was devolved back to Scotland after three centuries, the nation built a new and eccentric power base near the foot of the Royal Mile. Free guided tours of the labyrinthine interior of the Scottish Parliament (9) operate 11am to 5.30pm on Saturdays, Mondays and Fridays (0131 348 5200; scottish.parliament.uk).
The Museum of Edinburgh in historic Huntly House (10) tells the capital's story, while the Canongate Tolbooth opposite contains the People's Story Museum. Continue past St Giles' Cathedral (11) and follow signs to Lady Stair's House, occupied by the Writers' Museum (12). Here, you learn "the happiest lot on earth is to be born a Scotsman". All three open 10am to 5pm and noon to 5pm Sundays at festival time; free.
Take a view
Camera Obscura (13) at 549 Castlehill offers an optical feast: the city and its skyline projected on to a concave dish, on which you can pick out pedestrians along the Royal Mile. There's also a mirror maze (0131 226 3709; camera-obscura.co.uk; 9.30am to 9pm; £11.95).
Lunch on the run
The café in the crypt of St Giles' Cathedral (11) (0131 225 5147) offers stovies (slowly stewed meat, potato and onion, £6.50), alongside a daily Scottish special. Afterwards, take the short cut from the café into the handsome body of the church (0131 225 9442; www.stgilescathedral.org.uk; 9am to 5pm Saturdays, 1 to 5pm Sundays, 9am to 7pm other days).
The Neoclassical Scottish National Gallery (14) includes works by Rubens, Gauguin and Cézanne, and the museum's motif: Sir Henry Raeburn's Skating Minister (0131 624 6200; nationalgalleries.org; 10am to 5pm daily, Thursday to 7pm; free).
Across in the Old Town, the National Museum of Scotland (15) on Chambers Street (0300 123 6789; nms.ac.uk; 10am to 5pm daily; free) tells the story of the nation. The highlight is the Grand Gallery, a vast and elegant space newly liberated from a century of clutter.
"The birthplace of Harry Potter" is how the Elephant House (16) at 21 George IV Bridge (0131 220 5355; elephanthouse.biz) bills itself: J K Rowling began her writing career in the big, bright back room of this rambling café. As the sun sinks over the castle, you can sink a single malt, Scottish beer or a sauvignon.
Dining with the locals
Either stay on at the Elephant House for haggis, neeps and tatties, or head across to the New Town. The Dome (17) at 14 George Street (0131 624 8624; thedomeedinburgh.com) was formerly the Commercial Bank of Scotland. Starters include haggis in filo pastry (£7.50). The signature main is an 8oz Scottish fillet steak (£29.50).
Sunday morning: go to church
Princes Street Gardens separates the Old and New Towns. Descend by the steps near the west end of Princes Street to the atmospheric old churchyard of St Cuthbert's (18), strewn with ancient tombstones. Cross the footbridge over the railway and follow the path that winds around Castle Rock. Take Granny Green's Steps (19) down to the former execution site of Grassmarket and find the northern entrance to Greyfriars Kirk (20) – the city's first post-Reformation church.
The churchyard is full of dramatic memorials, while the Kirk itself (0131 226 5429; greyfriarskirk.com) has an elegant, austere interior. Visitors welcome at Sunday services (11am in English, 12.30pm in Gaelic).
Walk in the park
Calton Hill rises 450ft above sea level. It hosts the National Monument, an ambitious attempt to replicate the Parthenon in the "Athens of the North": work stopped after a dozen Doric columns had been completed. Close by, you can climb the 170 steps of the Nelson Monument (21) (10am to 6pm daily; from 1pm on Mondays; £3) for fine views across the city, the Firth of Forth and a swathe of southern Scotland.
Edinburgh sustains plenty of independent shops, with a cluster of galleries and boutiques along Victoria Street (22). On Leith Walk, Valvona & Crolla (23) at 19 Elm Row (0131 556 6066; valvonacrolla.co.uk) is a divine delicatessen offering all kinds of Mediterranean aromas and flavours – including a dozen varieties of olive oil.
Out to brunch
Valvona & Crolla (23) also has a restaurant at the rear; open 10.30am to 3.30pm Sundays, longer hours other days. Sip strong coffee and feast on Italian home cooking.
Take a ride
Bus 22 will take you to the Ocean Terminal, location for the Royal Yacht Britannia (24) – a true floating gin palace aboard which the Queen and Prince Philip entertained dignitaries (0131 555 5566; royalyachtbritannia.co.uk; 9.30am to 4.30pm; £12). It provides a fascinating glimpse into regal circles –and the monarch's tastes. Take tea on deck and enjoy views of Fife.
Icing on the cake
Finish at the high and mighty Castle (3). The stronghold of Scotland has served as royal residence and military headquarters, and is now the nation's leading paid-for attraction (0131 225 9846; edinburghcastle.gov.uk; 9.30am to 6pm; £16). From the battlements, you can appreciate the spectacular contours and architecture of this multi-faceted city.