He was also sentenced to 1,000 lashes and ordered to pay a fine of 1 million riyals ($266,000; Â£133,000).
Amnesty International called the verdict "outrageous" and urged the authorities to quash the verdict.
Mr Badawi, the co-founder of a website called the Liberal Saudi Network, was arrested in 2012.
A Saudi newspaper close to the government reported that he had lost his appeal against an earlier, more lenient sentence of seven years and three months in jail and 600 lashes.
Last year he was cleared of apostasy, which could have carried a death sentence.
Mr Badawi had previously called for 7 May to be a "day for Saudi liberals".  The website he set up has since been closed.
Amnesty International describes him as a "prisoner of conscience" and has called for his release.
"Raif Badawi is the latest victim to fall prey to the ruthless campaign to silence peaceful activists in Saudi Arabia," it said  in a statement.
Last October a Saudi journalist was freed after spending a year and a half in prison for writing insulting tweets about the Prophet Muhammad.
Hamza Kashgari fled Saudi Arabia for Malaysia in 2012 but was extradited just days later. He was released last year after making a public apology.
A Saudi court has imprisoned blogger Raif Badawi for 10 years for "insulting Islam" and setting up a liberal web forum, local media report.