The sentence is the harshest among cyber-crime related sentences handed down so far in the country. Pakistan has never executed anyone convicted of blasphemy.
Judge Shabir Ahmed of the Anti-Terrorism Court in Punjab province's Bahawalpur district announced the sentence for 30-year-old Taimoor Raza after holding him guilty of posting derogatory content on Facebook.
According to the Counter Terrorism Department of Punjab Police, Mr Raza, who hails from Okara, some 200 km from Lahore, was arrested last year at Bahawalpur following complaints by his co-workers that he had shared blasphemous content on Facebook.
Pakistan's tough blasphemy law has attracted criticism from rights groups, who say they are frequently misused to settle personal scores.
Pakistan last year passed a controversial cyber crime bill (Prevention of Electronic Crimes Act 2016) that proposed strict punishment for cyber crime offences.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.