The activists participated in protests last June to call for the release of the detainees and the annulment of a law that bans all but police-sanctioned demonstrations.
The Cairo court also ordered each of the 23 defendants to pay a fine of 10,000 Egyptian pounds (about USD 1,390).
The activists include Sanaa Seif, the sister of prominent Egyptian activist Alaa Abdel-Fattah who was sentenced to 15 years in prison for breaking the controversial protest law.
Some of the activists had supported the military's overthrow of Islamist president Mohamed Morsi in July last year which led to a deadly crackdown on the Islamist supporters.
