Facebook founder and CEO Mark Zuckerberg meets Founder and Executive Chairman of Alibaba Group Jack Ma (not pictured), at the China Development Forum in Beijing, China, March 19, 2016.

Facebook said Friday that it has determined that hackers gained unauthorized access to more than 30 million accounts. Of the more than 30 million accounts, 14 million had sensitive information including gender, names, email addresses, phone numbers, location check-ins and more exposed. The attack also revealed the messages of more than 400,000 people, it said.

The social media company has already created a page that will tell you if you are one of the affected accounts. All you have to do is make sure you're logged in and then head to this security notice page.

If your account was not part of the attack, Facebook displays this message:

"Based on what we've learned so far, your Facebook account has not been impacted by this security incident. If we find more Facebook accounts were impacted, we will reset their access tokens and notify those accounts."

If your account was affected, Facebook will tell you what sorts of private information that attackers gained.

"While we don't know if the attackers will use any of the information they accessed, it appears the information may allow them or other third parties to use it to create and spread spam on and off Facebook," a message to one affected account read. "We're actively working with law enforcement as we continue to investigate."

You might also consider deleting everything Facebook knows about you. Here's how to do that.

— CNBC's Michelle Castillo and Jillian D'Onfro contributed to this report.