Hanna's mommy saved her ass. Who's going to save yours?

Breaking the Code
Season 2, Episode 21
Air Date February 20, 2012
Written by Jonell Lennon
Directed by Roger Kumble
Episode Guide
Father Knows Best

Breaking the Code is the twenty-first episode in the Season 2 of Pretty Little Liars. It aired on February 20th, 2012.


PLL221 (1)

Discussing Jonah and the money

The episode begins with the Liars discussing the payoff they arranged with Jonah. When Emily asks how Spencer got the money so fast, she replies that it is from a relative who didn't want to be named. Aria and Spencer plan to meet Jonah at 6 pm and ask Emily and Hanna not to join them because he might get suspicious if they crowd him. Emily and Hanna want to come along, but eventually agree not to go.

PLL221 (2)

A's new prey?

Just then, Mona comes by and pulls Hanna aside to ask her about plans they'd made to shop for a dress for Mona to wear to a party. It is clear that Hanna forgot about their plans and tries to reschedule for tomorrow. At the same time, Mona receives a text from someone. When Hanna asks who it is from, she lies. After Hanna leaves, it is revealed that the text is from "A."

PLL221 (3)

Looking for Hanna

Later, at Hanna's house, Officer Wilden appears at the backdoor and wants to ask Hanna more questions. Ashley blows Wilden off and tells him that coming to their house is like this is harassment and so he decides to see them at the police station later.

PLL221 (4)

"We'll get through this."

At the Hastings' house, Spencer has just told Melissa about Jason being their half-brother. Melissa is visibly angry, and when Spencer tries to defend their mother, Melissa scolds her for it. Spencer also mentions that Alison knew. When Melissa questions if anyone else knows, Spencer tells her no. Melissa wants to keep it that way. Melissa decides to leave so she doesn't have to see their parents when they get home. Before leaving, she assures Spencer that they will get through this.

PLL221 (5)

Paige wants Emily to join her

Emily tries to call Maya, but only reaches her voicemail. Disappointed, she sits down and sees Paige, who invites Emily to go around town and collect donations for the swim team with her. Emily declines initially, but when Paige pushes, mentioning how swim season is over, and Emily finally agrees.

PLL221 (6)

Telling Hanna about the texts

Hanna is with Mona, who is trying to decide on a dress. Mona gets another text from "A" and this time tells Hanna about it. She says it's been happening since a few days ago and that the texts have been accusing her of shoplifting things. Hanna asks if any of the texts are about her, to which Mona replies that there are more about Hanna's mom. She shows her a suggestive photo of Ashley and Officer Wilden. Hanna lies and says it's obviously photoshopped, to which Mona agrees. When Hanna questions what Mona would do with the picture if the mystery texter started threatening her, Mona replies that if she can live through Alison, she can survive this anonymous texting.

PLL221 (7)

Jonah gives them an address

Aria and Spencer meet Jonah at the park. They give him the money, and he gives them an address. Unsatisfied with just an address, they ask him for more. He says that's all there is and that when he gave Vivian the address, she was happy with it. With that, Jonah leaves. Aria and Spencer are about to go to the address, but then they spot Garrett in his car, watching them. So, they decide to go later.

PLL221 (8)

Talking about Wilden

Hanna is still troubled by the picture Mona had shown her. So, she tries to talk to Ashley diplomatically about what would happen if anybody found out. Ashley replies that she could lose Hanna, because if Hanna's father wanted to sue for full custody, he would easily get it with this information.

PLL221 (9)

Ella shows the letter to Aria

Meanwhile, Aria talks with Ezra on the phone about his upcoming interview. Before they are able to discuss it more, Ella walks in and Aria pretends to be talking to Emily and quickly ends the call. Ella shows her the letter "A" had sent to Byron and asks Aria if she knows who sent it. Aria replies she does not, getting visibly nervous. Ella wonders if Ezra knows the person who sent the letter to which Aria quickly says no. Ella brings up the letter she got last year about Meredith, stating how that was signed by "A" too. Before leaving, she assures Aria that she and Byron will be looking into the matter.

PLL221 (10)

"I came out to my parents."

Emily and Paige return to school after collecting donations. Paige gets a call from her mom and refers to Emily as "just a friend." When Emily asks her about it, she admits that she came out to her parents. She thanks Emily for giving her the courage to do so. Paige also comments that she wished she'd come out sooner. Before Emily can reply, she receives a "S.O.S." text from Hanna. Before she leaves, she tells Paige that she is very happy for her.

PLL221 (11)

Hanna feels bad lying to Mona

The girls gather in Spencer's bedroom where Hanna tells the girls about Ashley's sleeping with Officer Wilden to get the shoplifting charges dropped. She also tells them Mona has been getting texts from "A" about it. When Emily asks Hanna how much she's told Mona, she replies that she's told her nothing, but she feels bad about lying to her. When Hanna goes downstairs to get food, Spencer asks Hanna to check if Garrett is still outside, as he followed her home.

PLL221 (12)

Spencer is furious

While Hanna is downstairs, Aria tells Emily and Spencer that "A" sent her dad a letter trying to get her caught with Ezra and now her mom is on the hunt to find out who "A" is. Spencer questions why "A "would send a letter like that if she and Ezra are not together anymore. Aria admits that they are actually still seeing each other. Emily accepts this, but Spencer is furious at Aria for lying. Aria apologizes, then before Spencer can reply, Hanna calls the other girls downstairs.

PLL221 (13)

Melissa in the video

Downstairs, Hanna has received an email from Caleb. It's another part of Ian's video from Alison's room. Surprisingly, instead of Alison walking into the room as they expected, Melissa storms in angrily, asking "Where is she?" The girls are shocked and Aria, Hanna, and Emily immediately want to turn Melissa in, but Spencer gets extremely defensive. The girls reluctantly decide to let Spencer talk to Melissa before they do anything.

Later, Spencer is seen waiting at a pub for Melissa.

PLL221 (14)

Gift from "A"

At Hanna's House, Mona shows Hanna the incident report from when Hanna shoplifted the sunglasses. The report was put into Mona's mailbox by "A." "A" had threatened Mona to give the report and the photo of Ashley and Wilden to the Rosewood Observer or else she'll be charged with shoplifting.

PLL221 (15)

Melissa and Garrett?

Spencer orders coffee from the waitress when Emily texts her asking her if she's talked to Melissa yet. Stressed, she steals a shot of liquor from the tray left unattended beside her. Just then, Wren walks in and they begin chatting. Spencer then sees Melissa outside, about to come inside, but then Garrett pulls up. She quickly turns and gets into Garrett's car. A confused Spencer watches Melissa go and wonders aloud why Melissa would get in a car with Garrett when she barely knows him. Wren reveals that he's seen them together at a doctor appointment before. Then Spencer receives a text from Melissa lying that her class ran late and that they have to reschedule.

PLL221 (16)


Hanna tells Mona about "A" and that the threat isn't a joke. When Mona asks about what "A" has done to her, Hanna doesn't know where to start. When Mona wants to know what to do about the report, Hanna isn't sure, but promises she will think of something in time. Mona asks her to hurry, showing her the text she got from "A" which gives her only until 10 am the next day to make a decision.

Melissa still won't pick up Spencer's phone calls and Spencer sneaks another shot.

PLL221 (17)

Ashley finds the report

Ashley clears Hanna's and Mona's school books off the kitchen counter and finds the incident report with "A's" threatening post-it note.

PLL221 (18)

Trying to run away

Meanwhile, Aria, Hanna, and Emily go to the address Jonah gave them. It is the house of an abandoned law firm office. The door is locked, so they look around. Aria sees a stack of letters in the mail slot and goes to investigate. She pulls at a letter when suddenly a creepy old man yells back at her from inside. An alarm goes off. Terrified, she falls backward and hurts her leg. The other girls help her up and they run away.

Spencer and Wren wind up at his apartment. She pours herself another drink and they joke about their respective family issues and personality flaws. Spencer, clearly drunk and acting very flirtatious, starts kissing him.

PLL221 (19)

"Hanna, face it. We got scammed."

At Hanna's house, Aria nurses her wounds, while Hanna is researches the law firm. She finds out that the firm closed down 3 months ago. She wants to find out who worked there, hoping it leads them to another clue, but Aria decides they got scammed. Hanna is frustrated and realizes that either her mom or Mona is going down, and she doesn't like either possibility.

Spencer and Wren continue making out until he tells her she is drunk and they should stop. Spencer admits that she is smashed and falls backwards onto the sofa.

PLL221 (20)

Confessing to Paige

Emily is at The Grille getting takeout when she sees a girl who looks like Maya. It's not though. Disappointed, Emily runs out of the Grille and almost collides with Paige. Paige notices that Emily is visibly upset, and tries to comfort her. She says Emily needs someone she can count on and gives her a hug. Paige tries to kiss Emily, but Emily backs away and leaves.

PLL221 (21)

Mona turned herself in

The next day, at 10:15 am, Hanna, believing that Mona turned her mom in, goes to tell Mona that she doesn't blame her. Mona reveals that she went to the jewelry store and returned the necklace she stole. The store owners called the police and it ended with Mona's mom working it out so Mona would get community service - serving food to the homeless. Hanna thanks her and Mona replies that she wouldn't do anything that would hurt her best friend and her mom.

PLL221 (22)

"You're welcome to stay on my couch anytime"

Spencer wakes up at Wren's house. Wren is back from work and Spencer realizes it is 10:30 and she is late for school. She apologizes for last night. Wren tells Spencer that she is welcome to stay over anytime. Spencer admits she may have to take him up on that the way her family has been lately. They kiss, but this time Spencer ends it and runs out.

PLL221 (23)

Mona joins Aria and Emily

At school, Emily sits down with Aria at the lunch table. Hanna passes by Mona and sees the creepy message "A" slipped into her lunch. Mona wants to leave school and not be a sitting target, but Hanna invites her to sit with her and Aria and Emily. Mona agrees.

PLL221 (24)

"I didn't give it to her."

Down at the police station, Ashley is angry with Wilden, believing he is the one who sent Hanna the police report. Officer Wilden is clearly shocked and tells Ashley that he would never give that to Hanna because he could lose his job if that report got out. Ashley wonders out loud who would give the paper to Hanna and why.

At school, Emily calls Maya again. Once again it goes to voicemail. She admits that she misses Maya like crazy.

PLL221 (25)

The end of Ezria?

Later, Ezra meets Aria in her car. Aria asks him about the trip and says she is glad it's all over. Ezra says that Aria's dad is clearly on to them and that he hasn't declined the offer yet. The job is an incredible opportunity and if he turns it down, Byron will know why. Aria says that they will figure something out like they always do. Ezra says that he's not so sure about that anymore. She asks if he is giving up on them. He says no, but they've been trying to work it out for a long time and maybe they should consider the possibility it is not meant to be. Aria is very visibly upset. Ezra leaves, having to get to class. She breaks down and cries in her car.

PLL221 (26)

Aria stops pretending

Back at her house, Aria curls up in her bed and continues to cry. Ella asks Aria what's wrong and Aria tells her to go away. Ella says she won't until Aria tells her why she's upset. Aria reveals to her that Ezra is leaving and so Byron's getting his wish. Ella is confused, but Aria doesn't believe that Ella wasn't a part of the scheme to get Ezra out of their lives. With some cutting words, she storms out.

PLL221 (27)

Ella just wants to listen

Later, Aria and Ezra eat and talk at Ezra's apartment. Aria wonders when he is leaving because it feels like he's left already. He assures her he won't be leaving right away. There is a knock at the door. Ezra opens it to find Ella. Initially surprised, then prepared for the fallout, he lets her in. Outraged, Aria wants to know if Ella plans to bring her home in handcuffs or just yank her out by her hair. Ella says neither. She came to listen.

PLL221 (28)

Melissa has something to say

While Spencer is home alone rewatching the video Caleb sent, she hears a noise. It turns out to be Melissa. Spencer wants to know where she's been and Melissa says she will tell her, but not now because their parents will be home soon and she can't say what she has to say in front of them. Melissa says it's the same thing she began to tell her the night of Ian's funeral. She turns to leave. Spencer reluctantly follows, leaving her cell phone and laptop on the kitchen counter.

PLL221 (29)

"I don't condone this relationship."

Ella stares at Ezra and Aria sitting opposite her on the couch. Aria wants to know what they're all doing there. Ella admits she does not condone their relationship, but is afraid of what will happen if she takes the same stance as Byron. She wants to understand the relationship between Aria and Ezra before anyone makes any rash decisions. They are interrupted by the kettle whistling.

PLL221 (30)

Ashley asks about the letter

Ashley returns home and says her board meeting ran late and she left Hanna some Thai food in the kitchen. Then Ashley spots the letter Aria had picked up lying on Hanna's bed. She asks Hanna what it is and Hanna lies that it came in the mail by mistake. Ashley says it's odd because it is addressed to FWL Law Firm, the one that she used for her divorce. Hanna asks why she would use a law firm so far away, and Ashley says Melissa Hastings interned there that summer.

PLL221 (31)

Where is Maya?

Emily is greeted at her door by Officer Barry Maple. He says he needs to talk to her about Maya St. Germain.

PLL221 (32)


At the end, a gloved figure is seen firing a handgun at a firing range. They have perfect aim.


  • Marlene King revealed via Twitter that Spencer will be "substituting caffeine for alcohol" in this episode, and when asked by fans if Spencer was going to be intoxicated, she said yes.


  • "Breaking the Code" is the title of a 1986 play by Hugh Whitemore about British mathematician Alan Turing, who was a key player in the breaking of the German Enigma code at Bletchley Park during World War II. The play thematically links Turing's cryptographic activities with his attempts to grapple with his homosexuality.
  • In this episode, the girls try to break "A's" code.

Main Cast

Supporting Cast


  • Alex Weed as Jonah
  • Sherita M. Starks as Waitress

Featured Music

  • "The Boy With the Arab Strap" by Belle and Sebastian (Spencer runs into Wren while waiting for Melissa)
  • "Blue Glasses" by Smokey & Miho (Spencer pours herself a drink at Wren's apartment)
  • "Whisper" by Perrin Lamb (Spencer gets drunk and Emily thinks she sees Maya)
  • "Can't Help Falling in Love With You (Live at Daytrotter)" by Ingrid Michaelson (Ezra considers taking the job in Louisiana)


Promotional & BTS

Memorable Quotes

Spencer [about Jonah]: Emily, if he can finally tell me who 'A' is, I would hand over a million.
Aria: Yeah, and not ask for change!

Emily [about Ashley]: We would never judge her. She's amazing. My mom would have driven me to the station and offered to take the mug shot.

Aria (quickly): A-sent-my-dad-a-letter-trying-to-get-him-to-catch-me-and-Ezra-and-now-my-mom's-on-the-hunt-to-find-out-who-A-is.

Hanna [about “A”]: Mona, if I told you everything, we’d be here until graduation.

Wren [about Garrett accompanying Melissa]: I wouldn't forget that. People don't usually bring a glock to the OBGYN.

Spencer: My family is so screwed up, Dr. Phil wouldn't even take us on.
Wren: My family has issues too.
Spencer: Oh really? Like what? (with an English accent) Did somebody butter their bread with a steak knife?

Aria: Don't pretend like you don't know, Mom. You may have gotten rid of Ezra, but guess what? You lost me too.

Ella: I want to be very clear. I don't condone this relationship. But I'm also afraid of what might happen if I take the same stance as my husband.
Ezra: So, I'm sorry, where does that leave us?
Ella: I wanna slow things down. Before anybody goes moving away, or [looking at Aria] running away, I want to understand what this is.

Ezra Fitz: Do you take milk with your tea?
Ella Montgomery: No.
Aria: Okay, what exactly are we doing here because I really don't feel like having a tea party with the two of you right now.

Aria: What time is it?
Spencer: 5:58.
Aria: Okay, what time is it now?
Spencer: Aria, it's still 5:58.


Community content is available under CC-BY-SA unless otherwise noted.