Belonging Blog

Alan Turing: The Codebreaker Who Won the War and Was Punished for Being Gay

Britain's greatest scientist broke the Enigma code, founded computer science, and imagined the first thinking machine. Then the country he saved arrested him for being gay. The real Alan Turing story, the apology, the pardon, and how to honor him in Pride Month 2026.

Alan Turing: The Codebreaker Who Won the War and Was Punished for Being Gay
Alan Turing: The Codebreaker Who Won the War and Was Punished for Being Gay

Alan Turing helped end the Second World War. He invented the field of computer science. He imagined the first thinking machine. And in 1952, the country he saved arrested him for the simple fact of being gay. This is his real story, told straight.

The short version

  • Turing designed the Bombe at Bletchley Park, the machine that let Britain read German naval Enigma traffic.
  • His 1936 paper defined computation itself, and his 1950 paper gave us the Turing Test.
  • In 1952 he was convicted of "gross indecency" and took a year of synthetic estrogen injections rather than prison, losing his security clearance with it.
  • He died on June 7, 1954, at 41, and the inquest ruled it suicide by cyanide poisoning.
  • Britain apologized in 2009, pardoned him in 2013, and passed Turing's Law in 2017 to clear 65,000 other men.

★ Alan Turing at a Glance

Born June 23, 1912, Maida Vale, London
Died June 7, 1954, Wilmslow, Cheshire (age 41)
Famous for Breaking the Enigma code, founding computer science, the Turing Test
Arrested 1952, charged with "gross indecency" for a relationship with a man
Pardoned 2013, by Queen Elizabeth II (59 years after his death)
Today His face is on the British 50 pound note
LGBTQ+ Pride Flag Featured in this post LGBTQ+ Pride Flag VIP price · 100% off $0.00$22.95 Shop now

Who Was Alan Turing?

Alan Mathison Turing was a British mathematician, logician, and cryptanalyst, now considered the father of theoretical computer science and artificial intelligence. He was born in 1912 in London and sent to boarding school at thirteen.

He was 22 when he wrote the paper that invented the modern computer: On Computable Numbers, with an Application to the Entscheidungsproblem. It described a hypothetical device, now called a Turing machine, that could in principle compute anything a computer can compute. Every phone running right now is a physical version of the idea he wrote down in 1936.

He was also a long-distance runner who almost qualified for the 1948 Olympic marathon team. And from the time he understood the word, he knew he was gay. In England in the 1930s, that was a fact you carried like a live grenade.

Vintage cipher machine, code-breaking notes, chess pieces, and a small rainbow Pride flag on a wooden desk

The Bombe was electromechanical, not electronic, and it worked by ruling settings out rather than guessing them.

Breaking Enigma at Bletchley Park

When Britain declared war on Germany in September 1939, Turing was already on a list. The Government Code and Cypher School had put the country's best mathematical minds on standby. The day after war was declared, Turing reported to Bletchley Park, a country estate about 50 miles north of London, and stayed six years.

The Germans used a cipher machine called Enigma to scramble their military communications, and the British called it unbreakable. The Polish had partially cracked an older version and handed their work to the British in 1939, but the Germans kept adding complexity. By 1940 the standard naval Enigma had about 158 quintillion possible settings per message, and the settings changed every day at midnight.

Turing did not single-handedly break Enigma. That myth needs to die. What he did, with a team including mathematician Gordon Welchman, was design the machine that broke it. The Bombe was an electromechanical monster the size of a small car that could test thousands of Enigma settings every hour, and by 1942 the Bombes were reading German naval traffic close to live. Historians estimate the work at Bletchley shortened the war by two to four years and saved between 14 and 21 million lives. All of it stayed classified for thirty years.

The Turing Machine and the Turing Test

The Turing machine from his 1936 paper was a thought experiment. Picture an infinite paper tape, a head that reads and writes symbols on it, and a small rulebook telling the head what to do next based on the symbol it sees. Turing proved that any calculation that can be carried out by a clear set of rules can be carried out by this machine.

His other big idea came in 1950, in a paper called Computing Machinery and Intelligence. It opened with a question: can machines think? Turing thought the question was badly framed, so he proposed a test instead. Put a person at two terminals, one connected to a human and one to a computer. If they cannot reliably tell which is which after a real conversation, the machine, for all practical purposes, can think. Every time someone asks whether a chatbot is "really" thinking, they are arguing inside the frame he built.

14M+

Lives historians estimate were saved by the codebreaking work Turing led at Bletchley Park.

The 1952 Arrest

In December 1951, Turing met a 19 year old named Arnold Murray outside a cinema in Manchester, and the two had a brief relationship. In January 1952, an associate of Murray's burgled Turing's house. Turing reported it, and during the police interview he mentioned the relationship.

That admission was a crime. Under Section 11 of the Criminal Law Amendment Act of 1885, any sexual act between men, public or private, was illegal in the United Kingdom. The law was sometimes called the "blackmailer's charter" for how easily it was used to extort gay men, and the same statute had been used to imprison Oscar Wilde in 1895.

Turing was charged with "gross indecency." He pleaded guilty on his lawyer's advice, and at sentencing he was given a choice: prison, or probation with hormone treatment attached as a condition. He chose probation so he could keep working. The treatment was a year of synthetic estrogen injections, now called chemical castration, and it made him impotent and altered his body. His security clearance was revoked, because the British government decided a man with a "homosexual disposition" could not be trusted around state secrets. The man who had read Hitler's mail was locked out of the rooms he built.

A bitten apple resting on a notebook of handwritten lambda calculus equations, with a teacup, peony, and small rainbow flag on a linen-draped table

The apple beside his bed was never tested for cyanide, which is why the argument has never closed.

How Alan Turing Died

On June 8, 1954, Turing's housekeeper found him dead in bed at his home in Wilmslow. He was 41. Beside him was a half-eaten apple. The coroner ruled the death a suicide by cyanide poisoning, and for decades the standard story was that he had laced the apple and bitten into it as a quiet, deliberate exit.

Some scholars now argue it may have been an accident, since Turing used cyanide for electroplating experiments at home and was careless with chemicals. His mother believed it was accidental. Either way he died alone, and the country he had given his best years to had spent the previous two punishing him for being gay.

The Long Path to an Apology

Nothing happened for 55 years. The Official Secrets Act kept his war work classified until the 1970s. In 2009, a British computer scientist named John Graham-Cumming started a petition demanding an official apology, and it picked up 30,000 signatures.

Then Prime Minister Gordon Brown answered. In an article published in The Telegraph on September 10, 2009, Brown wrote: "On behalf of the British government, and all those who live freely thanks to Alan's work I am very proud to say: we're sorry, you deserved so much better." That was the apology, not the pardon. Only the monarch can grant a pardon in the UK, and campaigners spent another four years pushing for one.

On December 24, 2013, Queen Elizabeth II issued Turing a royal pardon under the Royal Prerogative of Mercy. In 2017 Parliament passed Turing's Law, an amnesty that retroactively pardoned an estimated 65,000 men, living and dead, convicted under the same laws. About 15,000 of them were still alive. Britain finally said, in writing, that what it had done was a crime against its own people.

LGBTQ Pride Rainbow Flag

Featured Product

LGBTQ+ Pride Flag

The rainbow Turing never lived to see. Six bold stripes that say what his country could not, until decades after his death.

Shop VIP Discount →

Why Alan Turing Is on the 50 Pound Note

In 2019 the Bank of England announced that the new polymer 50 pound note would carry Turing's portrait, chosen through a public nomination whose finalists included Stephen Hawking, Mary Anning, and Ada Lovelace. The note entered circulation on June 23, 2021, on what would have been his 109th birthday. The design carries a 1951 photograph of Turing, ticker tape of his 1936 paper, a technical drawing of the Bombe, and a line from a 1949 interview: "This is only a foretaste of what is to come, and only the shadow of what is going to be." Every time the highest-value note in British circulation changes hands, the country that hounded him to death pays him a small, late respect.

Why Alan Turing's Story Matters for Pride

Most LGBTQ+ history writing focuses on the people who shouted: Marsha P. Johnson at Stonewall, Harvey Milk on the steps of City Hall, ACT UP shutting down the FDA. Turing matters for a different reason. He was quiet, he belonged to no movement, and he never came out in the modern sense because the modern sense did not exist. He did the work in front of him, loved the men he loved, and was destroyed for it by the nation he had saved.

His story answers anyone who asks why Pride Month still has to exist. The UK waited 59 years to apologize to its greatest scientist, the laws that ended his career stayed on the books until 1967, and 65,000 men were still carrying criminal records into 2017. The decent thing the rest of us can do is keep his story honest and keep the rainbow flying, which is the whole reason our Pride flags collection exists.

How to Honor Alan Turing Today

You do not need to be a mathematician to keep his memory alive:

1 Tour Bletchley Park, in person or online. Hut 8, where Turing led the naval Enigma team, is open to the public, and the bletchleypark.org.uk virtual tour is free.
2 Skip the movie and read the real thing. The Imitation Game takes major liberties. Andrew Hodges's biography Alan Turing: The Enigma is the book it was based on, and Turing's own 1950 paper is free online and startlingly readable.
3 Fly a Pride flag on June 23. His birthday is informally Alan Turing Day in tech circles. A rainbow flag in a window or on a desk is the simplest way to mark it, and backing Stonewall UK, the Human Rights Campaign, or Lambda Legal the same day is the other half.

Common Myths About Alan Turing

MYTH 01

"Alan Turing broke the Enigma code by himself."

He did not. Bletchley Park employed about 9,000 people at its peak, including hundreds of women who ran the Bombe machines around the clock. Turing led the team that designed the breakthrough machine, Gordon Welchman improved it, and the Polish Cipher Bureau gave the British a head start.

MYTH 02

"The 1885 law was repealed right after Turing died."

It was not. The Wolfenden Report of 1957 recommended decriminalizing private acts between consenting adult men, and Parliament ignored it for ten years. The Sexual Offences Act of 1967 legalized private acts in England and Wales, but only above age 21. Scotland waited until 1980 and Northern Ireland until 1982.

None of this is ancient history. People who lived under the law that convicted Turing are alive today, which is what makes his story feel close.

Alan Turing FAQ

Was Alan Turing actually openly gay?

Not in the way we use that phrase today, since the category did not exist in his lifetime. He was honest with close friends and with the police when they asked him directly in 1952. He never made it the center of his public identity, because the law made that impossible.

How did Alan Turing actually die?

The official cause was cyanide poisoning, ruled a suicide at the inquest, with a bitten apple beside his bed. Most historians accept that. A minority, including his mother and the scholar Jack Copeland, call it an accident of careless lab chemistry.

When was Alan Turing officially pardoned, and what is Turing's Law?

He was pardoned on December 24, 2013, by Queen Elizabeth II under the Royal Prerogative of Mercy, 59 years after his death. In 2017, Turing's Law extended a similar amnesty to roughly 65,000 other men convicted under the same statutes.

When is Alan Turing Day, and why is he on the 50 pound note?

June 23, his birthday, is observed unofficially by tech communities and LGBTQ+ groups. It is also the day the Bank of England put his portrait into circulation on the polymer 50 pound note in 2021, after a 2018 public nomination shortlisted him with Stephen Hawking and Ada Lovelace.

For more of the people whose lives connect to his, the Bayard Rustin profile covers another quiet genius punished for being gay, and the rainbow flag history traces the symbol Turing never lived to fly.

Fly the flag he never could

A rainbow flag is a small, daily way of saying what Britain took 59 years to say. VIP members get member pricing on every flag in the collection.

Shop VIP Discount → More Pride Less Prejudice Tee →

Featured in this post

Related reading

  • Folded rainbow fabric on a wooden table beside a blank pin board, flowers, and a ceramic mug

    A Brief History of Gay Liberation in the U.S.

    Gay liberation was built through local organizing, public resistance, and people making room for each other. Follow the timeline from early groups through Stonewall and the work that keeps Pride...

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.