Edinburgh was the city where J.K. Rowling wrote much of the Harry Potter series.
Rowling moved to Edinburgh in 1993 and lived there while developing and writing the books. She wrote in several locations, including cafés, and later worked at home. Edinburgh’s historic streets, architecture and atmosphere are often discussed alongside the world of Harry Potter, although Rowling did not claim that every fictional location was copied directly from one real place.
The city is also associated with the author through landmarks visited by fans, including Greyfriars Kirkyard and the Elephant House café. These places are part of the popular literary-tourism story, but the precise origins of individual character names and settings can be more complicated than a single-location explanation.
Edinburgh should not be confused with London, which is important within the fictional story because the magical community exists alongside the British capital. Rowling’s real-life writing city and the books’ fictional locations are related in public memory but are not the same thing.