Louise-Marie Suisse, 18, was stopped by two police officers near a mosque in the centre of Marseille in late July.
She was wearing a full-face veil, in breach of a ban introduced last year, and refused to cooperate with the police when asked to produce identity papers, her trial was told.
The teenager, who admitted biting one of the officers in the ensuing altercation, was given a six-month jail sentence with four suspended.
The judge went further than the prosecutor who had demanded a six-month suspended sentence.
Suisse turned up for the hearing in a full-body black niqab but with her face uncovered.
France has outraged many Muslims with its law against full veils, which came into force in April 2011 and bans covering one's face in public.
Violations are punishable by a fine of up to €150 ($190) or mandatory citizenship training.