Formal:
* Unlawful: This is a direct synonym with a formal tone.
* Against the law: This emphasizes the legal aspect.
* Forbidden: This emphasizes the restriction or prohibition.
* Prohibited: Similar to "forbidden", but with a slightly stronger connotation.
* Contraband: This specifically refers to goods that are illegal to trade.
* Illicit: This is a formal synonym with a slightly more negative connotation.
Informal:
* Outlawed: This emphasizes that something is no longer allowed.
* Wrongful: This focuses on the ethical aspect of the act.
* Against the rules: This emphasizes the violation of specific regulations.
* Off-limits: This emphasizes that something is not permitted.
* Not allowed: This is a simple and direct way to convey the meaning.
* Banned: This emphasizes the prohibition of something.
Other:
* Criminal: This refers to something that is considered a crime.
* Unauthorized: This emphasizes that something is done without proper permission.
* Unconstitutional: This refers to something that violates the constitution.
* Dishonest: This emphasizes the moral implications of the act.
The best synonym to use will depend on the specific situation and the tone you want to convey.