There are multiple definitions - click on the translation that matches your context.

不合法的

形容词

full

illegal

adjective

Definitions of illegal

English

not allowed by the law

It is illegal to sell a knife to anyone aged under 18 and the offence carries a maximum sentence of six months.