Damien Tarel who slapped the 43-year-old president Emmanuel Macron on Tuesday during a visit to Tain-l’Hermitage, south of Lyon, has been sentenced to four months in jail.
He was given four months in prison and an additional 14-month suspended sentence, and was banned from holding public office and from owning weapons for five years.
The 28-year-old did not deny the act in court.
According to television station BFMTV, which reported from the courtroom in Valence, he claimed to be a victim of injustice.
The incident, caught on camera, caused consternation throughout the country.
Mr Macron stood for the decline of France, BRMTV quoted Tarel as saying.
He had also considered throwing an egg or a pie.
Mr Macron talked about the incident in a TV interview on Thursday (local time), stressing it was an “isolated act”.
He went on to talk about violence against women and comment on how there had been “moments of very high tension in our country”, for example during the “Yellow Vest” protests.
About a year before national elections, and less than two weeks before regional elections, Mr Macron has been on a tour through France to meet voters.