The anti-pornography bill, which also outlaws overtly sexual material including music videos, was voted through after a short debate.
When Simon Lokodo, Uganda’s ethics and integrity minister, proposed the legislation earlier this year, he said that women who wore “anything above the knee” should be arrested.
The bill needs to be approved by the president before becoming law.
Uganda is a socially conservative country – it is also considering legislation to increase the punishment for homosexual acts, including the death penalty in some cases.
According to Uganda’s private Monitor newspaper, the new legislation will outlaw material which shows parts of the body including breasts, thighs and buttocks, or any erotic behaviour intended to cause sexual excitement.
It will also ban anything that shows indecent acts or behaviour intended to corrupt morals, the paper reports.
The BBC’s Catherine Byaruhanga in the capital, Kampala, says the new rules could affect Uganda’s popular tabloid papers.