Enjoy a £1 Waffle during your stay if you book directly with us. Book here!

Sleeping in Scottish History

When you stay at CODE The Court, you’re staying in one of the most historic buildings in Edinburgh’s Old Town, right on Parliament Square and just a few steps from the Royal Mile. Look out the window and you’ll see some of the city’s most famous landmarks. Look beneath your feet and you’ll find a forgotten piece of Edinburgh that was hidden for more than 200 years.

The Story of CODE The Court

Today, Parliament Square is filled with visitors exploring the Royal Mile and St Giles’ Cathedral. But long before travellers checked in here, this site was home to bankers, lawyers, police officers, judges, prisoners, and generations of Edinburgh residents.

And beneath it all lies a hidden piece of the city that was lost for over 200 years.

A guest looking out of a window at CODE The Court towards St Giles' Cathedral

It started long before us

Long before CODE, before the Police Chambers, and even before Parliament Square looked the way it does today, this was one of the busiest parts of Edinburgh.

The site our building occupies sits just off Old Fishmarket Close and was once home to what is believed to have been Scotland’s first bank building. For centuries, merchants, lawyers, traders and locals passed through this corner of the city, making it a natural hub of Edinburgh life.

Back then, the Old Town was a maze of towering tenements and narrow closes. Thousands of people lived and worked within these streets, packed tightly together beneath the shadow of Edinburgh Castle.

It was vibrant, thriving, and incredibly vulnerable to fire.

Historic painting of Parliament Square and St Giles' Cathedral in Edinburgh

The Fires That Changed Edinburgh

In 1700, a major fire broke out around Parliament Close, the area we now know as Parliament Square.

Hundreds of families lost their homes, and parts of the neighbourhood had to be rebuilt.

More than a century later, disaster struck again.

In November 1824, the Great Fire of Edinburgh tore through the Old Town for almost four days. Buildings collapsed, entire closes were destroyed, and large parts of medieval Edinburgh disappeared forever.

As the city rebuilt, many of the damaged structures were demolished and their remains pushed into the old closes below. New buildings rose above them, but some parts of Edinburgh were never seen again.

One of those hidden spaces became what we now know as The Lost Close.

Historic illustration of the Great Fire of Edinburgh in 1824 beside St Giles' Cathedral

The man who pioneered firefighting

As the flames tore through the Old Town, a young Edinburgh surveyor named James Braidwood found himself at the centre of the city’s response. Just 24 years old, he had recently been appointed Master of Engines for the newly established Edinburgh Fire Engine Establishment, widely recognised as the world’s first municipal fire brigade.

Braidwood brought a new, more organised approach to firefighting. Using his knowledge of Edinburgh’s buildings and streets, he introduced training, procedures and equipment that would help shape modern fire services across Britain. The lessons learned during the Great Fire proved invaluable, and his methods soon became the standard for generations of firefighters.

Today, a statue of James Braidwood stands just outside our building on Parliament Square outside CODE The Court, overlooking the very streets where he began his pioneering work. It’s a reminder that this corner of Edinburgh wasn’t only shaped by great fires, but also by the people determined to rebuild and protect the city afterwards.

Bronze statue of firefighting pioneer James Braidwood on Parliament Square, outside CODE The Court

A building with a very different purpose

In the aftermath of the Great Fire, Edinburgh continued to modernise.

Between 1845 and 1849, architect William Nixon and surveyor Robert Paterson designed the building that stands here today. It became Edinburgh’s Central Police Chambers, bringing together offices, courtrooms and police cells right in the heart of the city.

The building was designed in two halves. The northern side housed offices, while the southern side contained the courts and holding cells.

If you walk around the building today, you can still see those two personalities. The Parliament Square side was designed to fit in with the grand legal buildings surrounding it. The Old Fishmarket Close side is tougher, more practical and unmistakably built for a very different purpose.

Look carefully and you’ll still spot some of the original barred windows.

The original wood-panelled courtroom inside Edinburgh's former Central Police Chambers

More than just a police station

The word “police” meant something slightly different in the 1800s.

The Police Commissioners weren’t just responsible for law enforcement. They looked after everything from paving streets and street lighting to water supplies, firefighting and public order.

This building sat at the heart of it all.

Those brought here weren’t typically infamous criminals. Most were accused of relatively minor offences and would spend a night or two in the cells before appearing in court, often without ever leaving the building.

Today, guests check in downstairs and head off to explore Edinburgh. A century and a half ago, arrivals here had rather different travel plans.

Corridor of former jail cells with original barred gates, now Sleep Cells at CODE The Court

The Lost Close beneath the building

One of the things we’re most proud of at CODE is that our building helps tell a story many visitors never get to hear.

Buried beneath Parliament Square lies The Lost Close, a hidden piece of Edinburgh which disappeared during the rebuilding of the city after the Great Fire.

For generations it remained forgotten beneath the streets above.

Today, visitors have the chance to discover this remarkable space and experience a side of Edinburgh that most people walk right over without ever knowing it’s there. Step into this fascinating place for a whisky or gin tasting.

Excavating The Lost Close, the hidden close beneath CODE The Court in Edinburgh

A new chapter for the building

In 2019, this historic building began its latest chapter when it became CODE The Court.

We’ve worked hard to celebrate the character of the building while creating a place that feels welcoming, social and unmistakably Edinburgh. The history of the police chambers and jail lives on, and guests wandering our halls encounter the original jail cells! You can even sleep in a Private Cell, or the magnificent Courtroom.

Today, travellers from all over the world gather here in the same building that once housed police officers, judges and courtrooms. The purpose has changed, but the building remains what it has always been: a place where people come together at the heart of the city.

A Private Cell bedroom seen through an original barred jail cell door at CODE The Court

Book now

Stay at CODE The Court and experience one of Edinburgh’s most fascinating buildings from the inside. Whether you’re here to explore the Royal Mile, discover hidden underground history or simply find the perfect base for your adventure, you’ll be staying somewhere with a story unlike anywhere else in the city.

Enjoy a £1 Waffle during your stay if you book directly with us at The Court