Data and security breaches continually put consumer information at risk. The most recent incident occurred on July 19 of this year, when Capital One revealed a security breach that affected approximately 100 million American cardholders and applicants.

It was discovered through an internal investigation that an individual gained unauthorized access to data on March 22 and 23. According to the Justice Department, the individual connected to the incident has been arrested.

This is just the latest reminder of the scale on which people’s personal information can be compromised. Fortunately, there is something you can do to protect your personal data from hackers. You can freeze your credit – and thanks to a new law, doing so is free.

When you go to apply for new credit, lenders access your credit report from the credit bureaus to assess your creditworthiness. When you place a security freeze on your credit report, however, lenders are rendered unable to access your credit report or your credit score unless you’ve given specific permission for them to do so.

The main goal of a credit freeze is ensuring identity thieves cannot open new accounts in your name. With that in mind, these security freezes allow you to create a PIN number you can use to temporarily unfreeze your credit report if you need to apply for credit — for example, if you needed to apply for a home loan or car loan.

The good news about security freezes is that they do not impact your existing lines of credit. Even if you freeze your credit with the credit bureaus, you will be able to continue using open lines of credit and credit cards as normal. It’s also important to note that freezing your credit report has no impact on your credit score — the three-digit number that denotes your credit health.

However, a security freeze isn’t an end-all-be-all solution since creditors and lenders you already have accounts with can access your report and score without a PIN number. Some government agencies, including some law enforcement agencies, can also access your credit details during a freeze.

While you may not feel you are at threat for identity theft or other hacking methods, you may want to freeze your credit anyway. Doing so ensures that nobody can open an account and borrow money in your name. Not only can preventing this type of theft save you from financial consequences that result from identity theft, but it can save you from the stress it causes as well.

All adults should consider freezing their credit, but you consider the prospect even further if:

While consumers have been able to freeze and unfreeze their credit reports before now, they typically had to pay between $3 and $12 per credit bureau to do so. These costs may not seem substantial, but they are exacerbated by the fact that consumers are required to freeze their credit with all three of the major credit bureaus — Experian, Equifax, and TransUnion.

Fortunately, a new federal law dictates that people can freeze and unfreeze their credit at the three major credit bureaus with no charge starting September 21, 2018. The new law also extends fraud alerts made on your account from 90 days to one year.

If you opt to freeze your credit, here are the steps you’ll have to take:

Step 1: Visit each individual credit bureau to search for a link to their “security freeze” page.

You can also access the security freeze pages here:

Step 2: Enter personal information such as your name, address, previous addresses, Social Security number, and birth date. Answer any personal questions they ask about your background, including confirming information on previous loans and addresses.

Step 3: Say “yes” to the security freeze option and select a PIN number. Also make sure to write down your PIN number for safe keeping in case you forget. Make sure to keep your PIN number in a safe place that is not accessible by others.

Note: While the steps above may lead to a successful credit freeze, it’s possible you’ll need to mail in additional identifying information such as a bill with your name and address on it or a copy of your driver’s license.

While freezing your credit can protect you from having your identity stolen, there are still pros and cons to consider. Before you freeze your credit, make sure you understand the benefits and the consequences:

At the end of the day, placing a security freeze on your credit is a smart way to prevent identity theft before it starts. You will need to spend a few minutes on the computer to enter your information, but the peace of mind you gain will be well worth it.

This story was originally published on BankrateCreate an account on Bankrate today to get your free credit report along with expert advice to improve your score. Plus, set your financial goals to personalize your dashboard with resources to help you reach them.