You will soon be able to freeze your credit report for free, a step that can help protect you from identity theft.

Many called on Congress to make freezes free after the massive Equifax breach last year that exposed the personal information of more than 146 million Americans to hackers.

The provision was included in a broader bill passed by the House on Tuesday, which rolled back regulations on banks created by Dodd-Frank. The bill now heads to President Donald Trump's desk.

When you place a freeze on your credit report, it prohibits the credit rating company from disclosing your personal information, effectively preventing anyone from opening a credit card or loan in your name. You'd need to lift the freeze if you want to open a line of credit yourself.

A freeze goes a step further than a credit monitoring or fraud alert service. Those generally notify you of suspicious activity after it happens.

But under current state laws, there is often a fee to place and lift a credit freeze Most security freezes cost between $2 and $10, though several states have already made them free.

Plus, you'd need to place a freeze on credit reports at all three credit rating agencies — Experian, Equifax, and TransUnion — and pay a fee at each of them.

Related: How to freeze your credit

The new legislation will make placing, lifting, and permanently removing freezes free no matter where you live. It also requires consumer rating companies to fulfill your request within one business day if made online or over the phone, and within three business days if requested by mail.

The changes will take effect about four months after the bill is signed.

To set up your own credit freezes, go to the freeze page at each credit agency's website individually: Experian, Equifax, and TransUnion. You will be given a PIN that you'll need to lift or remove the freeze in the future.

Often there is no charge for victims of identity fraud to add or lift a security freeze. After the data breach, Equifax made freezes free for everyone until June 2018.