The president, who formally appoints the prime minister, took his time before endorsing Conte, whose resume has come under scrutiny this week.
Conte said he had "perfected his judicial studies" at numerous foreign institutions, including Cambridge University, New York University and the Sorbonne in Paris.
Most of the universities said they could find no trace of him on their databases, but Conte said he had attended in an informal capacity to use their facilities and meet colleagues, and had made no false claims.
Crucially, both 5-Star and the League, which had spent weeks trying to find a mutually acceptable candidate, stuck by him and put pressure on Mattarella to accept their recommendation.
He said he was committed to implementing a government program agreed to by the 5-Star and League leadership that calls for an immigration crackdown and budget-busting measures to help ordinary Italians.
A dapper dresser with a penchant for waistcoats, cufflinks and a white handkerchief poking out of his breast pocket, Conte teaches at Florence University and also practices as a lawyer in Rome.
Among the many colleges where Conte has taught is the Roman Catholic San Pio V institute, and Italian media reported that he had close ties with the Vatican.
Conte must now return to Mattarella with his Cabinet team.
If all goes smoothly, Conte could have his government sworn in early next week, ready to face the necessary confidence votes in both houses of parliament.
Inconclusive March 4 national elections had led to a hung parliament and more than two months of political deadlock.