The accused man, Abdullah H., exchanged instructions on ways to manufacture weapons and explosives with other suspected Islamists in a chat group on the Telegram messaging app, Berlin prosecutors said.
The Syrian stands accused of preparing “a serious act of violence against the state” and was arrested at his Berlin home, they added.
The suspect was employed as a cleaner at a primary school in the capital. Previously, he had worked until September in the Bode Museum on Berlin's Museum Island, said Interior Senator Andreas Geisel (SPD) on Tuesday.
Abdullah H. was originally reported to be 37. The State Attorney General's Office has corrected this to 26.
There was no information about a possible target for the suspect's attack. “We assume that there was a considerable danger,” said Geisel.
In a separate statement, federal prosecutors specializing in terrorist cases said special police forces searched the suspect's flat on Tuesday.
Abdullah H. is alleged to have started procuring the equipment and chemicals needed to build a bomb.
“This was to be detonated at an unknown time in an unknown place in Germany
in order to kill and injure as many people as possible”, said Geisel.
The accused notably purchased acetone and hydrogen peroxide in recent months, they added. Both are key components in the highly explosive TATP.
Germany remains on alert following a series of Islamist attacks, the deadliest of which was a truck rampage at a Berlin Christmas market in 2016 that killed 12 people.
Dozens of suspects have been arrested or charged over alleged terror plots in recent years.