It is rightly said that all illegal agreements are void but all void agreements are not illegal. The term void in contractual parlance as per section 2(g) of the Indian Contract Act, 1872 means “an agreement not enforceable by law” whereas the term illegal as per section 23 of the Indian Contract Act, 1872 means “any agreement which has unlawful object or consideration”. It can be said that void agreements are under the ambit of illegal agreements.
Now, illegal contracts have wide undertaking. And as per Section 23 of the Indian Contract Act, 1872 is an agreement with unlawful consideration and such unlawful consideration pertains to the consideration which is forbidden by law, is of such a nature that if permitted, would defeat the provisions of law, is fraudulent, involves injury to a person or if the court regards such act as immoral or against the public policy. Burrough J. once said that “public policy is an unruly horse, and when you get astride it you never know where it will carry you”.
(a) A minor enters into a contract with a major to supply certain clothes to the minor, this is a void agreement as the parties are not competent to the contract and it cannot be said that it is illegal.
(b) A contract entered between the parties to sell the horse and both the parties are at mistake that the horse is alive whilst, the horse is dead at the time of making the contract. This contract would have called illegal if the object or consideration were unlawful. For example, here the contract is to sell horse which is lawful and if in place of the horse the agreement is made to sell the stolen diamond, then it would be illegal agreement.
(c) A and B enter into an agreement that if A provides B into an employment of the public servant then B will pay A 50000/- rupees. The agreement is void, as the consideration is unlawful.