In 2012, Mubarak was sentenced to life after being convicted of complicity in the murder of protesters during the uprising. But he was eventually cleared on appeal.
He was also given a three-year jail sentence for embezzling public funds.
State media reported that he died at a Cairo hospital after undergoing surgery.
Egyptians divided over Mubarak’s legacy
By Sally Nabil, BBC News, Cairo
Dozens of Hosni Mubarak’s supporters, many dressed in black, gathered outside the mosque where the funeral was held. They held signs expressing gratitude for Egypt’s “greatest leader”.
“He was a wise man who kept this country stable for 30 years,” a middle-aged man told me.
Stability was Mubarak’s watchword. He took pride in keeping everything under control during his long autocratic rule. But this came at a massive price, according to his critics.
Egyptians who took part in the 2011 revolution say he was a corrupt dictator. They hold him responsible for the problems Egypt is suffering at the moment.
“It’s all part of his terrible legacy,” one young man said.
Some people on social media asked why Mubarak was given such a funeral when he had been convicted of corruption. They also compared his treatment to that of his ousted successor, Mohammed Morsi, who died last year while in court and was buried overnight with only a few members of his family in attendance.
Morsi was an Islamist, however, while Mubarak belonged to the military – an institution that has dominated Egypt’s political scene for more than six decades.
While some Egyptians consider Mubarak a figure from the past, a considerable number believe the time when he was in power was better than it is now. They say he left a small space for freedom of expression, unlike the current president.
President Abdul Fattah al-Sisi has expressed “deep condolences” to Mubarak’s family.
A statement paid tribute to his military service during the 1973 Arab-Israeli war. But it did not mention his time as president.
“[He was] one of the heroes of the glorious October war, when he led the air force during the war that restored dignity and pride to the Arab nation,” it said.
Mr Sisi served as Mubarak’s military intelligence chief and led the military’s overthrow of his democratically elected successor, Mohammed Morsi, in 2013.
Since then, he has overseen an unprecedented crackdown on dissent, in which tens of thousands of people have reportedly been detained, hundreds have been handed preliminary deaths sentences, and hundreds more have gone missing.