A cornerstone of British life is that justice must be seen to be done and therefore every courthouse and courtroom is potentially open to the public. Most of the British population lives within a few miles of a working courthouse, many of which are splendid Georgian or Victorian buildings and the grandest of them all, London's Royal Courts of Justice, actively encourages people to marvel at the splendours of its marbled halls (hmcourts-service.gov.uk).
Modern prisons, unsurprisingly, are less welcoming to the casual visitor but there are many old prisons and courts that capture the atmosphere of Britain's historic legal system.
In the Middle Ages, the principal courts of the land and the county prisons were often in major castles, usually the only strong stone public building for miles and the seat of the King or the most important landowner. In the 18th and 19th centuries, some castles were adapted to meet changing ideas about legal procedures. In Lincoln you can visit the 19th-century prison and courthouse within the walls of the castle (lincolnshire.gov.uk).
From the mid-18th century onwards the legal system began its transformation into the highly organised system we have today. John Howard pushed through reforms leading to a series of waves of prison construction. The Littledean jail in Gloucestershire (littledeanjail.com), one of the first generation of reformed prisons, survives remarkably intact.
By the early 19th century there was a widespread belief that prison life was too easy so more punitive forms of imprisonment were introduced, and features such as the treadwheel, on which prisoners walked for eight hours a day, were commonplace. The jail at Beaumaris, Anglesey (beaumaris.org.uk), is the only remaining example.
From the 1840s, the standard Victorian prison with cells opening on to landings was introduced. See them at Lincoln, Bodmin in Cornwall (bodminjail.org) and Ruthin in Denbighshire (ruthingaol.co.uk), all now museums.
Law and order - more sites of UK justice
Great Hall, Oakham Castle, Leicestershire
The 12th-century arcaded hall was the venue for the assizes courts before becoming the local magistrates' court.
rutland.gov.uk
The Old Gaol, Hexham, Northumberland
The medieval prison was used to house prisoners detained by the Archbishop of York on his land in "Hexhamshire".
tynedaleheritage.org
Cromarty Courthouse Museum, Cromarty, Ross and Cromarty, Scotland
With its distinctive cupola-topped staircase tower, the 18th-century courthouse includes a 1770s courtroom reconstruction.
cromarty-courthouse.org.uk
Totnes Guildhall, Totnes, Devon
Totnes Guildhall dates from the mid-16th century and was last used as a magistrates' court in 1974.
totnestowncouncil.gov.uk
Sandwich Guildhall, Sandwich, Kent
Built in 1579, it includes a unique collapsible jury box that was built when the courtroom was panelled in 1607.
sandwich-town.our-place.co.uk
The Galleries of Justice, Nottingham, Nottinghamshire
Containing cells and a Victorian courtroom, the museum also houses a large collection of items, including the Prison Service's collection.
galleriesofjustice.org.uk
Tolbooth Prison, Aberdeen
A small, well-preserved example of how unpleasant life would be in a 17th-century prison.
aboutaberdeen.com/tolbooth.php
The Judge's Lodging Museum, Presteigne, Powys, Wales
This purpose-built lodging house and assize court was built in 1829, and is now a museum for local history and law and order.
judgeslodging.org.uk
St George's Hall, Liverpool
Liverpool's monument to civic pride, which opened in 1855, reopened in 2007 following a £23m restoration programme, including the refurbishment of the criminal court and the judge's robing room.
stgeorgeshall.eu
The Courthouse Museum, Ripon, North Yorkshire
Built in 1830 as a quarter sessions court, Ripon magistrates' court closed in 1998 and reopened as a museum a year later.
riponmuseums.co.uk
The Shire Hall, Bodmin, Cornwall
Twelve years after closing as a court, the Shire Hall of 1837-38 reopened in 2000, featuring the Courtroom Experience - a reconstruction of an 1844 murder trial.
bodminmoor.co.uk/bodmintic
Greater Manchester Police Museum and Archive
One of the outmoded combined police stations and petty sessions courts. Open to visitors.
gmp.police.uk