Some working titles were "Vendetta" and "Snip Snip". "Hard Candy" was finally chosen because it implies both sweetness and spice. The expression is also slang for an under-aged girl, amongst pedophiles who use the internet.
Despite the intense emotional and physical content of most rest of the movie, Ellen Page said that one of the hardest scenes to shoot by far was the scene at Nighthawks, where for take after take she had to eat more tiramisu than she could ever want.
Ellen Page's initial audition was off-putting for director and producers because she had shaved her head for her previous film role, Mouth to Mouth (2005). At first, she was even mistaken for a boy. The effect of her haircut was countered upon donning a wig, as she then gave a phenomenal reading.
On the DVD commentary Patrick Wilson recalled that while filming on the roof, he had to shoot a scene where he yells, "You're not gonna shoot me," five times. After the third or fourth take someone within earshot - not part of the film crew - called the police thinking an actual attack was occurring.
The parking structure scene was shot on the roof of the garage that serves the Arclight Cinemas Hollywood theater complex. When the film was shown in that theater, many patrons were technically watching the scene unfold in the same spaces where their cars were parked.
The stunt coordinator's house served as the exterior for Jeff's house. The interiors of Jeff's house were inspired by that of producer David Higgins, who planned to shoot the film there if enough money could not be secured to build sets.
Sandra Oh's character was called Mrs. Tokuda in the script. When she arrived on the set, Oh said "I feel like a Judy Tokuda," which the director loved. However, the name had been made up on the spot and could not be cleared by the legal department, so the executive on the set asked for one take where she refers to herself Mrs. Tokuda. Oh didn't want to do the take, but finally relented on the condition that she would only have to do one take. However, she intentionally delivered the line "Tell him Mrs. Tokuda says Hi." in a ridiculous Midwestern accent, making the take unusable. The name Judy Tokuda eventually presented no clearance problems.
When they were filming the scene where Hayley implies that everything Jeff thinks he knows about her is a lie, producers asked if they could include a line where she states that she was actually 18 years old rather than 14. Ellen Page was adamantly against the suggestion because she thought it undermined the premise of the film.
Patrick Wilson claims on the audio commentary that shots of Jeff's body hanging from the side of the house were filmed, but he likes the version in the film in which the fate of his character is ambiguously left off screen.
The opening scenes at Nighthawks was shot last, with the set of Jeff's house transformed into a coffee shop. The very last scene they shot for the film was the bit where Hailey goes into the bathroom and changes into the T-shirt.
Hayley wears a red hooded coat in the final scene. Ellen Page wore an identical coat in Juno (2007), which could be a reference to this film. Some also see the similarity in that there's a scene where Juno nearly hangs herself, just like Hayley tries to get Jeff to do in this film.
Outside of the coffee shop scene at the beginning, almost the entire film takes place within the confines of Jeff's house. And outside of Jeff and Hayley, there are almost no other characters. The ones that do appear either get a few minutes of screentime or none at all.