The ban, proposed by the ruling coalition of three centrist parties, was also backed by the opposition populist Freedom Party, which was alone in calling for it to apply to school staff as well.
The only party to oppose the proposed ban was the smallest in parliament, the Greens, arguing it violates the constitution.
Rights groups have criticised the plan.
Amnesty International said it would "add to the current racist climate towards Muslims".
The body that officially represents Austria's Muslims has called it an infringement of fundamental rights.
"This is not about restricting freedom but about protecting the freedom of girls up to 14," Yannick Shetty, the parliamentary leader of the liberal Neos, the most junior party in the ruling coalition, told the lower house.
"It (the headscarf) is not just an item of clothing. It serves, particularly with minors, to shield girls from the male gaze. It sexualises girls," he said.
The minister for integration Claudia Plakolm of the conservative People's Party, which leads the ruling coalition, called headscarves for minors "a symbol of oppression".
Austria's Constitutional Court ruled in 2020 that a previous ban, which applied to under-10s in schools, was illegal because it discriminated against Muslims and the state has a duty to be religiously neutral.
Going against that principle requires special justification, it held.
Shetty said the government had commissioned a study that is still under way in an effort to meet that requirement, without elaborating on its content.
Education Minister Christoph Wiederkehr of the Neos said young girls were coming under increasing pressure from their families -- and also from unrelated young boys -- who tell them what to wear for "religious reasons".
The Greens' deputy parliamentary leader Sigrid Maurer agreed that is a problem and suggested interdisciplinary teams including representatives of the Muslim community be set up to intervene in schools when "cultural tensions" flare.
The ban applies to "headscarves that cover the head in accordance with Islamic traditions," according to the text of the law, which will come into force at the start of the 2026/2027 school year.
This also includes coverings such as hijabs or burqas.
An "information phase" will begin in February to prepare schools for the new regulation.
In the event of violations, the school management should first hold a meeting with the girl concerned and her parents.
If the child continues to wear a headscarf, the parents must speak to the relevant school authority.
As a last resort, fines of up to 800 euro ($A1,400) may be imposed.
with DPA