Gavin Scoular began preying on youngsters as a schoolboy and continued his serial offending for three years.
He identified victims through Facebook, Snapchat and Skype and raped them at his home in Niddrie, on waste ground behind Edinburgh Infirmary and in Holyrood Park.
Ex-swimming instructor Scoular, who gave private lessons at the Commonwealth Pool, now carried out seven rape attacks on four victims.
The 24-year-old had originally faced 132 charges involving more than 90 girls but a legal challenge over a Police Scotland search of his computers saw the number of allegations reduced to 34 charges.
Following the case, Detective Chief Inspector Martin Maclean of Edinburgh’s Public Protection Unit said: “Scoular is an extremely dangerous individual, taking every opportunity he could to go online and exploit young girls.”
And a leading charity urged any other victims who suffered at his hands to come forward and “speak up”.
A spokesperson for NSPCC Scotland said: “The threat posed to children by groomers like Scoular has increased in recent years and abuse is sadly still woefully underreported. For us to help children, we need people to speak up.”
Scoular denied his guilt but was convicted by a jury at the High Court in Edinburgh of 27 charges including rapes, grooming, sexual assault and underage sex.
The jury that convicted him heard Scoular’s sex crime spree went on until he was 18 and continued even after he was freed by a court on bail.
He used social media to make contact with potential victims and encouraged some to send him sexualised pictures and threatened to publish them online.
Scoular, formerly of Niddrie House Drive, carried out his sickening campaign of abuse between 2010 and 2013 - starting when he was just 15.
Jailing him, trial judge Lord Summers said: “You have been convicted of a catalogue of offences against young girls aged between 12 and 17.
“In most cases you coerced them into unwanted sexual activity by what we call online grooming.”
Lord Summers said Scoular used social media to make contact with girls and offered them affection and companionship at a time when some were vulnerable.
Despite his crimes, experts assessed Scoular as being at “medium risk” of re-offending and he dodged being slapped with an Order for Lifelong Restriction which could have seen him jailed for life.
Lord Summers told Scoular that he had originally opted to jail him for 18 years but reduced the sentence to 12 years because of his age at the time.
He also ordered that Scoular should be kept under supervision for a further five year period and placed him on the Sex Offenders’ Register indefinitely.
Advocate depute Steven Borthwick told the jury at Scoular’s trial last year that he had indulged in sexual conversations with them knowing they were under the age 16, the age of consent.
He asked girls to show him pictures of their naked bodies and in some cases to send them to him and went on to use such images to get them to do what he wanted.
The jury had not been told he was given a four and a half year sentence in 2014 at Edinburgh Sheriff Court after sending sexualised texts to young children.
Defence solicitor advocate Iain Paterson said a search of Scoular’s home took place in 2013 and mobile phones and computer equipment was seized.
The proceedings in the sheriff court were based on evidence from the phones. But the computer equipment was later looked at resulting in a second inquiry which led to the further charges in the High Court.
Mr Paterson said: “He has gone to the internet to engage with other people. Unfortunately he has engaged with other people in an entirely inappropriate manner.”
The solicitor advocate said: “He is a man who knows he has got to change. He wants to try to move on with his life.”
The court heard that Scoular used Facebook, Snapchat and Skype to befriend schoolgirls and would engage in online chatting, sometimes for weeks, to earn their trust before bringing pressure to bear.
Join our Facebook group Our Edinburgh to share images and news from and around the Capital