Between 1613 and 1875, if you were arrested by samurai police and convicted in a court of law — which almost always happened because the justice system of Edo (modern-day Tokyo) viewed letting people free as a failure on its part — then you prayed for no jail time.
Branding, tattooing, flogging or banishment to far-away provinces were all preferred to incarceration. That’s because the Edo government only had one prison, and it was a place where hope went to die. Well, hope and about 200,000 people. This is the story of the nightmarish Denmacho Prison.
Abandon All Hope
Located in Kodenmacho near Nihonbashi, and therefore sometimes also known as Kodenmacho Prison, Edo’s only holding facility was a little city of misery in the heart of Japan’s capital. It covered an area of about 8,700 square meters, where somewhere between 300 and 900 prisoners lived.
It was a massive complex of cells overseen by over 100 staff members and ronanushi,cell-block leaders who terrorized the prisoners. The building was surrounded by massive walls as well as a moat, with one of the entrances being called the Fujomon or the Unclean Gate, to add some insult to the injury that was coming your way.
Denmacho was also an execution ground and a place to brutalize the accused to get a confession out of them before trials, with dedicated torture rooms and everything. Things weren’t that much better in the cell blocks, where the conditions would need a few weeks of deep-cleaning and a total operational overhaul to be merely considered “bleak.”
There were no windows in the cells, and the lack of ventilation combined with limited access to water contributed to horrific stenches and frequent outbreaks of diseases such as scabies. There were doctors on the premises, but their role was mainly to sign death certificates stating that a prisoner died of “natural causes” even if their body was covered in bruises.
Non-lethal beatings were part of an initiation process for new prisoners, after which they were asked if they had a lifeline — inochi no tsuru in Japanese — which was basically asking if they had money or someone on the outside who could get them some. If the answer was “no,” the beatings would continue. Violence was the universal language of Denmacho, though there was one more thing that talked at the prison.

Men being arrested with Edo-period weapons
Even in Hell, Money Counts
All manner of people were housed at Denmacho, including samurai, monks and commoners. Not in the same cells, though, because even in prison, the feudal system believed in a social hierarchy, so the high-ranking prisoners got sent to a VIP section.
The Agari-zashiki and Agariya sections were built in 1683 to detain the direct vassals of the shogun, nobles, prominent priests and political prisoners. They provided semi-private spaces, access to baths, actual ventilation, better meals and even books and writing implements.
However, these weren’t freebies. The high-ranking prisoners were expected to pay for all this, but if they had enough money, they could basically create conditions where you could momentarily forget you were in prison, including your private furniture and even servants. “Even in hell, money counts” is actually an old Edo period proverb, and it was exemplified in Denmacho.
Still, there were some things that money and privilege could not buy. One of Denmacho’s most famous residents was the distinguished intellectual Yoshida Shoin, who was arrested for planning to overthrow the Tokugawa shogunate in the late Edo period.
He was briefly held in the VIP section, only to then be beheaded. Ii Naosuke, the man responsible for his imprisonment, was later gunned down in the streets and decapitated.
The Prison Would Occasionally Hold a Purge Night
Not every official at Denmacho was inhuman. In 1657, during the Great Fire of Meireki that destroyed more than half of Edo, the prison actually released the prisoners so they wouldn’t burn to death, with the expectation that they’d return within the next 3 days.
According to some sources, most of them did. This reportedly happened a few more times, with the same results. Although, probably not when the prison was starting to get a bit overcrowded. When that happened, you did not want to be in Denmacho.
To control the population of the prison, authorities sanctioned or outright ordered the murder of “expendable” prisoners. The most common targets of these purges were vagrants without a steady address or occupation, as their death was seen as no big loss to society.
Other targets included ex-policemen as well as people without money for bribes or those who annoyed the ronanushi cell-block leaders. Inmates who snored were apparently one of the first ones to go during a Denmacho purge.
Since the inmates didn’t have access to weapons, a deviated septum could result in an ugly death by strangulation, suffocation or blunt-force trauma to the head using anything heavy the prisoner could find or their fists. Many of the dead were then transferred to the sick ward so the doctors could record the cause of death as “sickness.”
It’s estimated that as many as 200,000 people died in Denmacho during its history, either via execution, disease or murder. After the prison was shut down and demolished — with only a few traces remaining — the Daianrakuji Temple was built on the execution grounds to appease the spirits of those who lost their lives in Denmacho.
It seems to have worked since, unlike Kozukappara, one of Edo’s other execution grounds, Kodenmacho isn’t now known as one of the most haunted places in Tokyo. Does that count as a happy ending?