Married 57-year-old father Dino Scala was arrested Monday after police used his number plates to connect him with the rape of a woman last week across the border in Belgium.
DNA evidence then matched him to that found on several rape victims.
The man, who is from the northern French town of Pont-sur-Sambre near the Belgian border, confessed under police questioning to attacks on women dating back decades.
“He estimates the number of victims at around forty,” Jean-Philippe Vicentini, prosecutor in nearby Valenciennes, told reporters.
He was arrested in connection with an investigation opened in 1996 into attacks on 19 women and underage girls, the prosecutor said.
Vicentini said the man always used the same method to prey on his victims.
“The women were attacked from behind, very early in the morning,” he said.
“He wore gloves and masked his face, either completely or partially — with a hat, for example,” Vicentini said, adding that the suspect claimed he “acted on compulsions he was unable to control”.
The Voix du Nord local newspaper reported that the attacker, who was arrested in his car in his hometown, worked as a janitor.
The man is believed to be one of the most prolific serial rapists France has seen in decades.
In 2015, a 40-year-old man was charged with 33 counts of rape, attempted rape and sexual assault from 1995 to 2000, most of them in the Senart forest south of Paris.