A 13-year-old girl from the US has invented a programme which encourages cyber bullies to think twice before posting offensive comments online.

Trisha Prabhu's Rethink project has already earned her a place as one of Google's 15 Global Science Fair finalists. She said that the device was inspired by the realisation that teenagers are more impulsive than adults.

"I hypothesized that if adolescents (ages 12-18) were provided an alert mechanism that suggested them to rethink their decision if they expressed willingness to post a mean/hurtful message on social media, the number of mean/hurtful messages that adolescents will be willing to post would be [less] than adolescents that are not provided with such an alert mechanism," the Illinois native wrote in an outline of the project.

"Research also shows that adolescents that post mean/hurtful messages may not understand the potential consequences of their actions because the pre-frontal cortex, the area of brain that controls reasoning and decision-making isn't developed until age 25," she writes.

Rethink includes a content filtering system, which screens for abusive words and phrases in messages, and posts a warning asking the user if they are sure they want to post a message including them before it is sent.

Already, the programme has proved a success, with 93.4 per cent of teens who took part in a study deciding to review or not to send abusive messages after being given the chance to review their content.

Research shows that up to 50 per cent of teenagers have been subjected to cyberbullying.

Prabhu is already working on rolling out the programme onto social media sites and mobile platforms.