Jafar Panahi asked each of the girls in the film to turn up with their own idea of how they would disguise themselves as a boy and what we see in the film was the girls' own attempts.
It was filmed at an actual stadium during a qualifying match for the Iranian National team. Panahi had two separate outcomes to the film depending on the turnout of the match.
Knowing that the film would be controversial, Panahi and his crew submitted a fake script about some young men who go to a football match to Iranian authorities in order to get permission to make the film. However, before they began shooting the Ministry of Guidance, which issues licenses for films to be shown publicly, told Panahi in advance that because of his past films they would not issue Offside a license until he re-edited his previous films. Not wanting to miss the World Cup tournament, Panahi ignored the Ministry and began shooting the film.
Panahi has stated "I use the football game as a metaphor to show the discrimination against women on a larger scale. All my movies have that topic at their center. This is what I am trying to change in Iranian society."
Panahi cast non-professional actors for the film, and the group of young girls in the lead roles were mostly university students that Panahi found through friends who all were passionate fans of football.