secret
ˈsiːkrɪt
"Secret" works as both a noun and an adjective in English. As a noun it denotes information deliberately withheld from others; as an adjective it describes something hidden or undisclosed. The right German equivalent depends on the grammatical role and the level of formality.
1. Geheimnis
For the noun 'secret': a piece of information or fact that someone deliberately withholds from others.
2. geheim
For the adjective 'secret' in formal or official contexts: classified, confidential, not intended for public knowledge.
3. heimlich
When 'secret' describes furtive behaviour or a covert action, often implying something done on the sly or without permission.
Notes
"Geheim" and "heimlich" are easy to confuse: "geheim" refers to the classified status of information (Geheimdienst = intelligence service), whereas "heimlich" describes furtive or stealthy behaviour (on the sly, behind someone's back). The German equivalent of "top secret" is "streng geheim".