The shorts use the energy generated by an average person when they are on the move to power up a battery for four hours.
Along with the shorts, researchers have also developed a sleeping bag that charges your phone while you sleep.
The Power Shorts are made using a fabric which turns walking into electrical power. Gaps in the clothes are squashed together during normal movement and the energy created is then converted into juice for your mobile, The Sun reported.
Festival-goers at the Isle of Wight Festival in UK this weekend will be some of the first to benefit from the invention after scientists teamed up with Vodafone to develop the technology.
A spokesperson for the phone company said the shorts could help to transform the way that mobiles are charged.
“Our ambition was to create a practical but exciting solution to the charging-related issues experienced by many at outdoor events. We hope that people harness the power in their pocket to keep them chatting and texting throughout their entire festival season,” Christian Cull, Director of Communications at Vodafone, said.
The Recharge Bag also works in a similar way to the shorts but instead of movement turns body heat into battery life for a mobile.
And after dozing for eight hours, it stores up enough energy to power your mobile for the rest of the day.
Professor Stephen Beeby from the University of Southampton who is in charge of the research, said the technology could soon be rolled out more widely.