Diablo Cody was first approached to write a screenplay by film producer Mason Novick, who had previously landed her a book deal for her memoir, Candy Girl: A Year in the Life of an Unlikely Stripper, after discovering her blog about stripping. He persuaded her to adapt the book for the screen, but suggested that she first write a screenwriting sample to show studios; that sample became Juno. After deciding on an adoption storyline, Cody collected the stories of adoptees, birth parents and adoptive parents, including that of her then-husband, an adoptee who reunited with his birth parents after she wrote the film. She also found inspiration in the story of a close friend who had become pregnant in high school and used some details from her friend's experience in the film, such as mistreatment from an ultrasound technician. Much of Juno, however, was based on Cody's own high school experiences: She dated a tic-tac-loving boy similar to Paulie, she was best friends with a cheerleader like Leah, and she used a hamburger phone identical to the one that appears in the film. After writing the screenplay over seven weeks in the Starbucks section of a Target store in Crystal, Minnesota, Cody compared writing to breathing, seeing Juno as an extension of herself.
Novick sent Cody's screenplay to his friend Jason Reitman; by the time Reitman had read halfway through the script, he felt that if he did not direct the film, he would regret it for the rest of his life. Initially, Reitman found it difficult to acquire the script, because his first film, Thank You for Smoking, had not been released yet, so he did not have any feature film credits. Other directors, including Jon Poll, were considered, but Reitman was chosen and he interrupted work on his own spec script in order to direct Juno. Cody says she had a cynical attitude when writing Juno ("I didn't ever think this film would be produced") and, indeed, the film was delayed by financial problems. After its controversial nature scared off a number of major studios, John Malkovich's production company, Mr. Mudd, took on the project. It was later brought to production company Mandate Pictures by co-producer Jim Miller.
The funding originated from the United States.
Having admired her performance in Hard Candy, Reitman cast Ellen Page in the lead role, saying that when he read the screenplay for the first time he pictured her as Juno. He visited her on the set of a film on which she was working to offer her the role. He also handed the script to J.K. Simmons, who had featured in his previous film, Thank You for Smoking, not telling him that he intended Simmons to play Mac. Simmons says that, after reading the script, he would have been happy to play even the high school teacher who has no speaking lines. Other cast members Reitman had "in mind right from the start" were Olivia Thirlby—who had originally unsuccessfully auditioned for the role of Juno—and Michael Cera. He took them with Page and Simmons to a Panavision stage in California and shot 45 pages of the script on 35mm film against a black backdrop. He presented this footage to Fox Searchlight as the initial cast. Reitman highlighted the importance of doing a screen test instead of individual auditions, saying: "This is a movie that's all about relationships and the idea of auditioning people outside of each other, one-on-one with the casting director, didn't make sense."
Jennifer Garner, who accepted a lower salary than usual to prevent the film from exceeding its budget, was confirmed by Reitman to have signed onto the project in January 2007. After working with Jason Bateman on The Kingdom, Garner recommended him to Reitman when they first met; Bateman was cast as Mark, the last cast member to be signed. Lucas McFadden, better known as Cut Chemist, a DJ and record producer, makes a cameo appearance as Juno and Paulie's chemistry teacher. McFadden was doing scoring work for Reitman when he received the Juno screenplay and asked McFadden to appear in the film; Reitman thought that it was "perfect irony" for the chemistry teacher to be played by Cut Chemist.
Michael Cera stated that the film had "a lot of Canadian influence" due to the fact that he and Page were Canadian and that a lot of the other actors originated from Vancouver. Cera's comment was a response to a statement from Peter Howell of the Toronto Star: "I thought Juno was a very Canadian movie, even though it was set in the U.S."
Shooting on a budget of US$6.5 million, Juno was filmed in and around Vancouver, British Columbia, standing in for Minnesota, where production was originally intended to take place. Although films commonly use a Canada-as-America location shift for budgetary reasons, Reitman insists the choice of filming location was instead at his request. Filming locations included a house in nearby White Rock as Mark and Vanessa's home, Eric Hamber Secondary School as Dancing Elk High School, and South Surrey's Athletic Park track as Dancing Elk High School's athletics track.
After minimal rehearsal, filming took place in February and March 2007 on a six-week schedule, of which 30 days were designated to filming. The crew was planning to import snow for the film's winter events, but it snowed on location, and they were able to reschedule filming to shoot the winter scenes during snowfall, which second assistant director Josy Capkun says resulted in much wider snow shots than originally planned. Although the film was shot out of sequence, the final scene was scheduled for the final day and, after a long period of rain, the crew was intending to shut down production and resume months later to shoot the scene, set in summer, but the rain stopped and they were able to shoot the scene in the sun. That final scene depicted Juno and Paulie singing The Moldy Peaches' "Anyone Else but You", and band member Kimya Dawson visited the set to speak to Page and Cera while they were practicing the song.
The movie features several songs performed by Kimya Dawson in her solo, Antsy Pants and The Moldy Peaches guises. This was due to a suggestion by Page. Director Jason Reitman explains:
At one point, I asked Ellen Page before we started shooting, '[W]hat do you think Juno listens to?' And she said ['The Moldy Peaches.'] She went on my computer, played the songs, and I fell in love with it. Diablo and I discussed putting a Moldy Peaches song in it where the characters would sing to each other. I got in touch with Kimya Dawson of The Moldy Peaches[,] and she started sending me her work, which was beautiful, and that became a lot of the soundtrack.
Reitman contacted Dawson, and, after reading the film's screenplay, she agreed for her songs to be used in the film, sending him a packet of CDs containing about 120 songs. The songs were almost entirely self-published by Dawson, who says she wrote nothing specifically for Juno and that all the songs had been performed and recorded before she was contacted to work on the film. Reitman asked her to additionally re-record instrumentals, which included humming over the lyrics of some of her songs. He also contacted composer Mateo Messina, with whom he had previously worked on Thank You for Smoking, to compose the film's incidental score. He gave Messina a collection of Dawson's songs and asked him to create "the sound of the film" through an instrumental score that replicated the recording quality, tone, feel and innocence of her music. Messina decided to implement an "acoustic guitar feel that was jangled and was really loose, like Juno." Experimenting with different guitars, he ended up using "Stella," a second-hand guitar belonging to guitarist Billy Katz that he described as "kind of tinny, not perfectly in tune, but [it] has all kinds of character." Katz was hired to perform acoustic and classical guitar for the movie's score, using "Stella" extensively throughout.
Page also suggested Cat Power's cover of the song "Sea of Love", which Reitman was hesitant to include as it had already been featured in the 1989 film Sea of Love; however, he decided that its inclusion would mark a "new take" on the film's cinematic references. Initially, Reitman had conceived of Juno being a fan of glam rock, but rejected it as too inauthentic, and he said he wanted to construct Juno to be "into music very real and authentic", making her a fan of punk rock, including The Runaways, Patti Smith and Iggy Pop and the Stooges. He felt that the Sonic Youth cover of "Superstar" defined Juno and Mark's relationship—Juno preferring the classic 1971 version by The Carpenters while Mark preferred Sonic Youth's 1994 cover. "A Well Respected Man" by The Kinks was a song Reitman had associated with a character from another of his screenplays and says it was "heart-breaking" when he decided to include the song as an introduction for Paulie instead, despite feeling it suited the scene perfectly. He found children's songwriter Barry Louis Polisar's "All I Want Is You" after "surfing iTunes for hours on end" using different words and names as search terms and thought that the handmade quality was perfect for the opening titles, which were afterwards made to correspond to the song. The "Brunch Bowlz" jingle, Mark writes in the film, was composed by advertisement writer Chris Corley, with whom Reitman had previously worked on a set of commercials for Wal-Mart.
The film was set out in a sequence of the year's seasons, which, Reitman said, "really resonated with me when I read it, because they mirror the three trimesters of Juno's pregnancy." Because filming took place over only 30 days, fake flora were used to give the impression of different seasons while other flora were edited in post-production. Brown leaves were composited onto a fake tree outside Juno's house and cherry blossom trees outside Leah's house were touched up in a lighter shade of pink to depict autumn; a fan was used to blow leaves around in some scenes as if the leaves were falling from trees. Fake flowers were used in front of Paulie's house at the end of the film to give the impression of summer. Reitman used different colors to inform character, such as the burgundy and gold Dancing Elk High School track uniforms and an early scene with Juno in a red hooded jacket "walking through a world of somber greens and browns."
Cody was impressed with the production design team's creation of the set from only a few sentences in her script, calling Juno's bedroom "a very emotional set for [me] because it reminded me so much of my own little habitat when I was a teenager." The walls of Juno's room are covered with posters of bands, while Leah's room includes a mural of older men she finds attractive and Paulie's room is overly childlike to indicate his innocence. Production designer Steve Saklad designed Mark and Vanessa's house with the assumption that "Vanessa has probably read every home magazine and tried to copy what's in them as best she could." Costume designer Monique Prudhomme was nominated for a Costume Designers Guild Award in the "Excellence in Contemporary Costume Design for Film" category. She dressed Vanessa in clothes that were "simple and very tasteful" but with an "anal-retentive quality" and Mark in conservative clothing to complement Vanessa's taste. It was Page's suggestion that Juno wear flannel shirts and sweater-vests. Page also had to wear two sizes of prosthetic belly fitted like a corset in the back, a third "real" belly that is seen when Juno has an ultrasound, and a variety of sizes of fake breasts. The footage displayed on Juno's ultrasound monitor is of supervising sound designer Scott Sanders's son Matthew and was embedded into the scene in post-production.
Opening title sequence
Juno's opening title sequence, depicting a rotoscoped Juno walking through her town while drinking a bottle of SunnyD orange drink, was put together over 7–8 months by a small design studio, Shadowplay Studio, based in Los Angeles. Reitman had met the studio's co-founder Gareth Smith in Japan on the short film festival circuit where they each had shorts screening. Shadowplay created the opening title sequence for Reitman's previous film, Thank You for Smoking, and he contacted them again when he found out he was going to direct Juno. With vintage 1970s punk-rock posters as inspiration, Smith and artist Jenny Lee decided to create a sequence that "had texture and a little bit of edge, but also imparted the warmth and heart of the screenplay". In the last days of filming in Vancouver, Ellen Page was photographed with a high speed camera from a number of angles walking on a treadmill and drinking SunnyD. 900 still images of a walking and drinking Page were printed out and repeatedly run through a Xerox machine to degrade their quality until the pictures appeared hand-drawn. The pictures were cut out and scanned back onto the computer, then layered onto the background drawn by Lee with compositing software to create a stop motion animation sequence that corresponded to "All I Want Is You" by Barry Louis Polisar, the song Reitman had chosen. Shadowplay also designed the titlecards for each of the seasons for the film, hand-made a custom typeface for the opening title sequence and the closing credits, and collaborated on the design of the soundtrack and the DVD.