The architecture in Middle-earth, J. R. R. Tolkien's fictional world, varies from the Hobbit-holes of the Shire, the tree-houses of Lothlórien and the wooden halls of Rohan to the stone dwellings and fortifications of Minas Tirith, capital of Gondor. Tolkien uses the architecture in each place, including its interior design, to provide clues to each people's character. The Hobbit Bilbo Baggins's cosy home, Bag End, described in his 1937 children's book The Hobbit, establishes the character of Hobbits as averse to travelling outside the Shire. In his fantasy novel The Lord of the Rings, Lothlórien demonstrates the close integration of the Elves with their natural environment. The King of Rohan's hall, Meduseld, indicates the Rohirrim's affinity with Anglo-Saxon culture, while Gondor's tall and beautiful stone architecture was described by Tolkien as "Byzantine". In contrast, the Dark Lord Sauron and the fallen Wizard Saruman's realms are damaged lands around tall dark towers.

Makers of films set in Middle-earth have developed or modified Tolkien's indications of architecture to convey their views of the various Middle-earth peoples and their cultures. Peter Jackson created an extensive set of the Shire with multiple Hobbit-holes, a mill, and a bridge in the New Zealand countryside, used in his films of both The Lord of the Rings and The Hobbit, and elaborate film sets of other places in Middle-earth using bigatures and computer animation. Scholars have admired his films' effective visual interpretation of Middle-earth settings. The production design of The Lord of the Rings: The Rings of Power has created architectures for places not seen in Jackson's films, such as Númenor and the Elvish realm of Lindon.

Tolkien's writings have spawned many imitators among fantasy authors, including of his medieval settings. Tolkien fans, too, have created a wide variety of materials and activities to immerse themselves in Middle-earth.

J. R. R. Tolkien's vision

J. R. R. Tolkien was a medievalist and a philologist as well as an author. He speaks in his lecture "On Fairy-Stories" of sub-creation, making a secondary world that is in some sense true for the reader. The Tolkien scholar Johanna Brooke comments that architecture is part of the secondary world; the more unlike the primary world's the buildings are – and Hobbit-holes are clearly unlike – the harder it is for the author to create "the inner consistency of reality". She comments that architecture in The Hobbit and The Lord of the Rings serves to point up where cultures are similar and where they differ, emphasising the multiculturality of Middle-earth.

The fantasy author and scholar of literature Kim Wilkins describes Tolkien's work as "the beginning ... of popular fantasy fiction, ... spawn[ing] countless imitators" among fantasy authors, including its "alternative medieval Europe" setting. She argues that the architectural setting is "a privileged aspect" of fantasy. In her view, immersive fantasy with an "incredibly detailed world" is driven primarily by "the exposition and elaboration of the setting, from which characterisation and plots specific to the setting are then generated", rather than being driven by character or plot. She cites Tolkien's description of Minas Tirith's architecture as evidently medieval:

She writes that Tolkien is here describing the city from a great distance, "zoom[ing] the reader out, suggesting the wide scope and large scale that are key pleasures of the genre." In addition, she states, Tolkien effectively creates an impression of "height and light": the city is tall, beautiful, and bright, suggesting the pride of the city and its people.

Hobbit-holes

Tolkien made his Hobbits live in holes, though these quickly turn out to be comfortable, and in the case of Bag End actually highly desirable. Hobbit-holes range from the simple underground dwellings of the poor, with a door leading into a tunnel and perhaps a window or two, up to the large and elaborate Bag End with its multiple cellars, pantries, kitchen, dining room, parlour, study, and bedrooms, with several south-facing windows looking out of The Hill across the England-like Shire. Tolkien may have based his Hobbit-holes on Iceland's turf houses, such as those at Keldur. He makes Bag End in particular a place where, in the Tolkien scholar Thomas Honegger's words, "most readers feel severely tempted to put on their imaginary slippers and settle down to a piece of cake and some tea." Honegger argues that places have a critical role in The Lord of the Rings, and the function of the safe Hobbit-hole is to establish the character of the "hol-bytlan (hole-dwellers), in the first place stationary beings who have a deep-rooted aversion against travelling outside the Shire."

While Tolkien gave descriptions of Bag End and other Hobbit buildings, and made drawings and paintings of some of them, he left room for other people, including the cartographer Karen Wynn Fonstad, to fill in the details of the buildings' architecture, such as by drawing a plan of Bag End with its many rooms for food storage, preparation, and eating. She showed her vision of its comfortable layout with its cellars and pantries, complete with multiple fireplaces and chimneys, based on but going beyond the clues given by Tolkien in The Hobbit and The Lord of the Rings. Her plan makes Bag End some long and up to wide, cut into the Hill. Honegger writes that Fonstad's work has contributed substantially to giving Middle-earth an "independent existence".

Elvish dwellings

Tolkien's 1937 painting Rivendell depicts the Elvish house in a mountainous setting with prominent cliffs. In that painting, and in sketches from different viewpoints, he shows the house, unfortified in its valley. It has a square tower with a hipped roof, beside a larger building with a pitched roof and a loggia with columns and sometimes gently curved arches; there are some outbuildings. In The Hobbit, Bilbo and the Dwarves lead their ponies down the steep path to the fast-flowing river and cross "a narrow bridge of stone without a parapet ... And so at last they all came to the Last Homely House, and found its doors flung wide." In The Lord of the Rings, Sam and Frodo experience a sizeable house, but again the outside, both the gardens and wild nature, is given prominence. The Hobbits walk "along several passages and down many steps and out into a high garden above the steep bank of the river. He found his friends sitting in a porch on the side of the house looking east. Shadows had fallen in the valley below, but there was still a light on the faces of the mountains far above. The air was warm. The sound of running and falling water was loud, and the evening was filled with a faint scent of trees and flowers, as if summer still lingered in Elrond's gardens."

Matthew T. Dickerson writes that Elrond's house in the valley of Rivendell consistently represents a sanctuary, a place that felt like home, throughout Tolkien's legendarium.

Lothlórien's city is Caras Galadhon (from galadh ("tree"). Founded by Amroth in the Third Age, deep in the forest, the city's dwellings were atop tall mallorn trees; the mallorn had been brought to that land by Galadriel. The city was "some ten miles" from the point where the rivers Silverlode and Anduin met, close to the eastern border of the realm. In the trees there were many tree-platforms, from simple guard-posts to elaborate dwellings. Stairways of ladders were built around the main trees, and at night the city was lit by "many lamps" - "green and gold and silver". The city's entrance was on the southern side.

Brooke comments that in Lothlórien, Tolkien had worked in his personal concern for nature. Further, she suggests that Lothlórien embodies the Victorian era critic John Ruskin's principles of Gothic architecture. She argues that the centrality of the mallorn tree to the Elves makes architecture hard to distinguish from nature. Further, the colours of silver and gold in the hall of Galadriel and Celeborn recall both the silver-grey of the mallorn trunks and the circle of trees "arrayed in pale gold" in Lothlórien, and the Two Trees of Valinor, with Laurelin's golden fruit and Telperion's silver flower. This in turn, she writes, implies that the Elves of Lothlórien are wholly integrated with their forest environment. In Unfinished Tales, Tolkien speaks of the mallorn grove "carpeted and roofed with gold"; Brooke writes that this mixes the lexical fields of architecture and nature description, revealing the intertwining of the two in the Elvish realm.

Dwarvish halls of stone

Tolkien depicted Moria, the central but lost capital of Middle-earth's Dwarves, as an enormous underground realm, without saying much about how it looked. He devoted considerable effort to depicting the Doors of Durin, Moria's western gate, creating both a large coloured pencil drawing of the gate's setting at the foot of blocky vertical cliffs beside the lake guarded by the Watcher in the Water, and a detailed finished ink illustration of the round-arched doors themselves, complete with Tengwar script and Dwarvish emblems.

Alan Lee went further into Moria to sketch the high halls of stone hollowed out by the Dwarves inside the Misty Mountains, with massive carved and patterned square columns supporting angled arches and soaring monolithic stone vaults.

Rohan's wooden hall

Meduseld, the Golden Hall of the Kings of Rohan, is in the centre of the town of Edoras at the top of the hill. "Meduseld", Old English for "mead hall", is meant to be a translation of an unknown Rohirric word with the same meaning. Meduseld is based on the mead hall Heorot in Beowulf; it is a large hall with a thatched roof that appears golden from far off. The walls are richly decorated with tapestries depicting the history and legends of the Rohirrim, and it serves as a house for the King and his kin, a meeting hall for the King and his advisors, and a gathering hall for ceremonies and festivities. Tolkien hints at the hall's heroic connotations by having Legolas describe Meduseld in a sentence that directly translates a line of Beowulf, "The light of it shines far over the land", representing líxte se léoma ofer landa fela.: it is line 311 of Beowulf.

Brooke comments that Meduseld represents "a more historical reworking of architecture", given its evident Anglo-Saxon roots, while Gondor's Minas Tirith suggests a "more classical legacy" from European history. The parallels do not imply identity: unlike the Anglo-Saxons, the society of Rohan is strongly centred on the horse, and the Rohirrim choose to fight on horseback.

Gondor's stone buildings

The capital city of Gondor was Minas Tirith. It had seven walls: each wall held a gate, and each gate faced a different direction from the next, facing alternately somewhat north or south. Each level was about higher than the one below it, and each surrounded by a high white stone wall, with the exception of the wall of the First Circle (the lowest level), which was black, built of the same material used for Orthanc. This outer wall was also the tallest, longest and strongest of the city's seven walls; it was vulnerable only to earthquakes capable of rending the ground where it stood. The Great Gate of Minas Tirith, constructed of iron and steel and guarded by stone towers and bastions, was the main gate on the first wall level of the city. Tolkien called it a "Byzantine City".