The Supreme Court in Delhi has decided that a law which could have people sent to jail for making pretty harmless comments on Twitter and Facebook is unconstitutional.
The judges say section 66A of the Information Technology Act breached the Indian constitution and struck it from the statute book.
The order was made after it was successfully argued that this section of the law violated the principles of freedom of speech and expression.
The law allowed people to be sent to prison for three years for sending emails or other electronic communications that upset or annoyed other people.
Several people have been arrested for posting comments about politicians on Facebook, and for sending tweets that annoyed people.