Tonali will miss the rest of the season as well as next summer's European Championships if Italy manage to qualify.
The 23-year-old appeared as a second half substitute in Newcastle's 1-0 defeat to Borussia Dortmund in the Champions League on Wednesday.
Tonali became Italy's most expensive footballer when he joined Newcastle United from AC Milan for £55m this summer.
Tonali is alleged to have placed bets on matches he played in for AC Milan and in some matches when he was absent.
He is the latest Italian footballer to be banned for betting offences after Juventus midfielder Nicolo Fagioli was handed a seven-month ban for similar breaches last week.
Aston Villa winger Nicolo Zaniolo is also under investigation for betting offences.
Italian Football Federation president Gabriele Gravina said: "An agreement has been reached between the federal prosecutor and Sandro Tonali. The plea agreement is for 18 months, of which eight months is for rehabilitation, which involves therapeutic activity and making at least 16 public appearances.
"The rules call for a certain number of years of suspension, but the plea bargain and extenuating circumstances have been taken into consideration and the players' collaboration went above and beyond, therefore we must continue to respect the rules we have established for ourselves."
"We can't just think about punishing the boys and not helping them recover," Gravina added.
"I think it's worth a lot more, rather than a month ban, eight months of giving talks about what they went through, in an honest way and with the right behaviour."