Those found guilty face up to two years in jail.
Leading campaigner Gina Martin praised the bill as "politics and society at its best".
Members of the upper House of Lords on Tuesday gave the bill the final seal of approval, and it now only requires the formality of Royal Assent.
Prime Minister Theresa May personally backed the legislation, saying the practice left victims "feeling degraded and distressed".
The bill was briefly held up last year when a single MP blocked it by shouting "Object!" during a parliamentary vote.
Indian man arrested for taking 'upskirt' photos of women through shoe camera
Christopher Chope, a member of May's Conservative Party, claimed he was objecting to the manner in which the bill was introduced, but was met with cries of "shame" from MPs.
Martin tweeted that she was "over the moon" about the vote, adding "I AM EXHAUSTED AND SO HAPPY!".
18ontha ago I decided I wasn't going to ignore sexual assault.
— Gina (@ginamartinuk) January 15, 2019
Now? Our bill has passed the last stage.
Upskirting is going to be illegal. https://t.co/yFMl5Fu20B
From Liverpool in northwest England, Martin was attending a music festival in London's Hyde Park when a man rubbed against her while his friend lurked nearby.
"Five minutes later, I saw that his friend... was watching a picture…," she told AFP earlier. "I knew it was me immediately."
Martin grabbed the phone and showed the image to police officers, but "they said 'we can't really help you'."
She then decided to campaign to make it illegal, collecting more than 100,000 signatures of support in an online petition.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ