A victim of online “revenge porn” will get her own chance at retribution — going after more than 500 Tumblr viewers who got their kicks watching the non-consensual video.

The first-of-its-kind ruling, handed down by a Manhattan judge Wednesday, ordered the social networking platform to disclose the personal information of the hundreds of people who have shared the sex video — which featured the victim when she was an underage teenager — so she can sue the users over the privacy breach.

“I’m directing Tumblr to disclose to petitioner all the account registration information concerning each individual account that re-blogged the images and videos that are at issue here,” said Manhattan Supreme Court Justice David Cohen.

He gave Tumblr five days to comply.

“It’s good news. Now they can’t hide behind a computer anymore,” said the 27-year-old woman, who believes an angry ex posted the decade-old video.

Experts say the ruling could have far-reaching privacy implications.

“I’ve never seen anything quite like this before,” said Darius Maxwell Fisher, head of the reputation management firm Status Labs. “This could be the first of many issues like this where your anonymity is stripped from you.”

“Revenge porn” is the posting of non-consensual sex videos and photographs, usually by a scorned ex. Cohen made the ruling after learning that the footage in this case was filmed when the Bronx woman was just 17.

The tape shows her “engaged in a multitude of sexual acts … without her permission and consent,” her lawyer Daniel Szalkiewicz told the judge.

She only learned that the footage was on Tumblr earlier this year when strange men began contacting her through Facebook with offensive questions like, “Did you like the way his c—k felt? Sure looks like you did.”

Szalkiewicz said Tumblr hasn’t taken the matter seriously.

“Tumblr’s office is 1.5 miles away and they haven’t even bothered to show up today,” he said in court.

Tumblr only removed the material after The Post contacted the $1.1 billion company in March when the paper first reported her story. Szalkiewicz plans to use the account information — including names and IP addresses — to sue the people who reposted the material for money damages over the woman’s emotional distress.

“It had a huge emotional toll on me,” she told The Post. “I went through months when I was feeling really depressed.”

Reps for Tumblr did not return messages seeking comment, but Ohio attorney Aaron Minc, who specializes in internet law, said the company will likely appeal the order.

“It seems really overbroad. If I were Tumblr I might object to it just on the basis that producing all that information within five days for 500 people seems a bit burdensome and unreasonable,” Minc said.

But he added that the merits of the ruling would probably survive an appeal.

“Are the identities of people who re-blog this stuff relevant? I would say yes,” Minc concluded.

Courts in the Netherlands and Japan have issued similar rulings in the past. In the US, federal courts routinely sign off on orders unmasking users accused of copyright violations, according to Alan Butler, senior counsel at the Electronic Privacy Information Center.