It's taken Australian electronics experts six years to develop the nifty gadget.
It's the size of a mobile phone, so small enough to fit on the wrist or ankle of swimmers or divers.
Sound waves
It works by surrounding the swimmer with a special electrical field which only sharks can sense through their snouts.
If a shark goes anywhere near a swimmer, the field causes the animal pain so it swims away from it.
But it's not all bad news for the sharks. Larger devices could be used on beaches too.
This means there would be no need for the nets which are put up to keep them out of swimming areas.
Often they, as well as dolphins and turtles, get tangled in nets and die.
Hopefully the new gadget will save hundreds from a gruesome death.