Bangladesh’s Muslims will celebrate the day after a month-long fast on Saturday, if the moon is sighted on Friday.
Cameron urged families and friends who come together to celebrate the festival to think about “the better Britain and world we must build together”.
“This Ramadan, we’ve seen the very best of British Muslim values,” he said.
“We’ve seen unprecedented charity – zakat – with thousands upon thousands of pounds raised for the needy”.
He said Britain had also seen “community spirit with inventive ways of breaking the fast with people of all faiths”.
He wished all “a happy and peaceful” Eid –‘Eid Mubarak’.
The Prime Minister, however, recalled the sufferings of Muslims in Syria and Iraq during the Ramadan at the hands of ISIL and Assad.
He also recalled the victims of terrorism at Kobane, Kuwait mosque, and on the Tunisia beach.
“This terrorism is not just an assault on those victims. It’s not just an assault on Islam, whose good name it perverts. It’s an assault on us all, on our way of life, and we must defeat it,” he said.