The men, both aged 25, appeared at Westminster Magistrates' Court but cannot be named for legal reasons.
One man, known only as "AB", was charged under Section 5 of the Terrorism Act 2006, which relates to preparation for acts of terrorism.
Both have been charged under Section 58 of the Terrorism Act 2000 - relating to possession of terrorist information.
The charge relates specifically to a computer file labelled "bomb making".
More From This Section
Prosecutor Michael Atkinson made an application for the names of the defendants not to be released to protect the security of an ongoing investigation.
District Judge Michael Snow allowed the application, saying it was necessary "to prevent the administration of justice from being damaged".
The pair have been remanded in custody and will now appear at the Old Bailey court in London on November 18.
The two men were arrested earlier this month in a car at Whitechapel in east London after police fired "Hatton rounds" - ammunition designed to burst tyres and blow open doors.