Masked Hamas militants fatally shot the Palestinians in the courtyard of a mosque in the Jabaliya refugee camp on charges of spying for the enemy yesterday.
Hamas-affiliated Al-Majd website quoted security sources as saying that the four were executed in a "revolutionary" way after "legal measures were completed".
The website has warned that future collaborators would be dealt with in the field to create deterrence.
The Islamist faction declined to release the names or pictures of the executed for the sake of social stability, fearing backlash against their families.
Also Read
Hamas has warned that Israel will "pay the price" for killing three top leaders of its military wing - the Qassam Brigades.
Earlier, the Palestinian Authority (PA), which controls the West Bank, denounced the executions of alleged collaborators, calling them "extrajudicial".
The PA President's office condemned Hamas for failing to abide by existing legal procedures for dealing with the cases.
Although collaboration with Israel is punishable by death in the Palestinian legal code, President Mahmoud Abbas has maintained a moratorium on the death penalty since 2005.
The Palestinian death toll in Gaza has now reached 2,102, including about 500 children, with more than 10,550 injured during the 47-day conflict. In Israel, 68 people have died.
UN agencies have said that 70 per cent of those killed in Gaza are civilians, including women and children.