Frankfurt prosecutor Nadja Niesen said authorities believe the suspects were in the early stages of planning an attack in Germany.
"There was not yet a concrete attack target that we're aware of," she said.
They were arrested at their home in the Raunheim area, southwest of Frankfurt in the state of Hesse. Overall, some 200 police officers raided 15 homes in Ruesselsheim, Biebesheim, and Raunheim in Hesse as well as one in Kerpen in North Rhine-Westphalia
The nationalities of the other suspects were given as either German or German-Moroccan. The 12 were between 22 and 33 years old and face charges of accessory to planning an attack in Germany, Niesen said.
No names were released in line with German privacy regulations.