Celebrity Instagram accounts hit hard by purge

Pop sensation Justin Bieber went to bed last night with a pretty healthy ego and a massive Instagram following; 23.8 million, in fact.

Both took a major hit overnight.

Bieber was the biggest celebrity loser of Thursday night's "Instapurge," the systematic deletion of fake accounts on Instagram. Bieber lost 3.5 million followers in the move, or 14.8 percent of his count, according to data compiled by Zach Allia, a Boston-based app developer.

Read More'King of Instagram' held without bail in LA

Other celebrities who fell victim to the Instapurge include Kim Kardashian, who lost 1.3 million followers, 5.5 percent of her crowd; and singer Beyoncé, who lost 831,971 followers, or 3.7 percent. Among the 100 accounts on Instagram, the average number of followers lost was 671,789, according to the data.

The data was compiled from public information on Instagram, Allia said. "I have over 300,000 followers on Instagram, and for months I kept on receiving messages saying I'd (lost) some followers."

Allia added that he wanted to see how his loss of fake followers would compare to that of the Top 100 Instagram accounts. "Fake accounts follow popular accounts to make it seem like they're real," he said.

Read MoreFewer and fewer teenagers using Facebook: Report

Even though the Instapurge deleted millions of fake accounts, "It's still kind of hard to know who bought followers," said Allia.

Here is a chart of the Top 10 Instagram accounts and how the Instapurge affected them:

Followers Yesterday
Followers Today
Followers Lost
instagram 64,131,228 45,251,017 18,880,211
justinbieber 23,817,614 20,279,386 3,538,228
kimkardashian 23,519,002 22,218,039 1,300,963
beyonce 22,207,790 21,375,819 831,971
arianagrande 21,748,827 20,219,621 1,529,206
selenagomez 19,572,601 18,456,569 1,116,032
kendalljenner 17,048,332 16,141,435 906,897
taylorswift 16,540,314 15,814,935 725,379
khloekardashian 15,929,263 15,180,994 748,269
kyliejenner 15,651,311 14,824,782 826,529
Zach Allia