This article is reprinted by permission from NerdWallet

Inflation has come down especially hard on people already struggling to put gas in their tanks and groceries in their refrigerators. For many, a payday loan may seem like the only way to get necessary cash.

In recent years, however, as more states set restrictions on risky, short-term loans, new lenders offering lower-cost small loans have cropped up, making it easier than before to find an affordable loan that won’t drag you into unmanageable debt.

In some states, new laws mean better loans

There is currently no federal law for maximum interest rates on small-dollar loans; rather, states decide whether to cap payday loan rates. As a result, the cost to borrow a few hundred dollars often depends on where you live.

In recent years, four states — Colorado, Hawaii, Ohio and Virginia — have passed laws that effectively lower the cost of small loans and give borrowers longer repayment terms. A study by The Pew Charitable Trusts released in April found that even under the reforms, payday lenders continued to operate, but with safer loans.

Also read: More U.S. subprime borrowers are missing loan payments

Though some new lenders started doing business in these states once the laws took effect, the main impact was that existing payday lenders consolidated storefronts and made their loans more affordable, says Alex Horowitz, senior research officer with Pew.

National banks and local credit unions step in

A bank or credit union may not have been your go-to for a small loan in the past, but it could be today.

Seven large banks have started offering or announced plans to offer small-dollar borrowing options with low annual percentage rates in the last few years, Horowitz says, including Bank of America BAC, +0.95%, Wells Fargo WFC, +0.64% and Truist TFC, +1.49%. These loans are available to the banks’ existing customers nationwide, regardless of state interest rate limits.

Banks rely primarily on customers’ banking history instead of their credit scores to determine whether they qualify for a small loan. The loans — which start as low as $100 — are usually repaid in monthly installments at APRs no higher than 36%, the maximum rate an affordable loan can have, according to consumer advocates.

“The fact that banks are starting to offer small loans could upend the entire payday loan marketplace,” Horowitz says.

Local credit unions have membership requirements and keep lower profiles than payday lenders, so they’re often overlooked by people who need fast cash, says Paul Dionne, research director at Filene, a think tank that focuses on helping credit unions serve their communities.

But if you can walk to your local credit union, there’s a good chance you’ll qualify for membership, he says.

That’s because credit unions often serve people who live or work in their communities. These organizations have been striving for financial inclusion by tailoring their products, like loans, to better fit their customers’ needs, Dionne says.

“Credit unions are getting better at having the actual best product and not saying no and actually figuring out what is the best solution for this person walking in,” he says.

Read: CFPB shuts down payday lender it calls ‘a darling’ of venture capital

Other borrowing options

Even in states where laws aim to banish payday lending altogether, people are able to find alternatives to risky borrowing, says Charla Rios, small-dollar loan and debt researcher with the Center for Responsible Lending.

You may be able to work out a payment plan with your utility company or borrow from a friend or family member, she says. Here are a few borrowing options to consider before getting a payday loan.

Paycheck advances. Some companies, including Walmart WMT, +1.97% and Amazon AMZN, +3.66%, let their employees access part of their paycheck early as a workplace benefit. This can be an interest-free way to borrow money if your employer offers it, but because repayment comes from your next paycheck, it’s best used sparingly.

Cash advance apps. Apps like Earnin and Dave let you borrow a small amount of money, usually $25 to $200, before payday. They sometimes charge fees for instant access to your money or ask for voluntary tips. They also take repayment from your next paycheck.

“Buy now, pay later.” For necessary expenses, a “buy now, pay later” loan lets you purchase an item with only partial payment. You pay the balance in equal installments, typically over the next six weeks. This type of financing can be interest-free if you pay the full balance on time.

Low-interest installment loans. Depending on your credit score and income, you may qualify for an installment loan with an APR below 36%. These loans have amounts from $1,000 to $100,000 and are repaid over longer terms, usually two to seven years. Online lenders that offer bad-credit loans often pre-qualify you for a loan using a soft credit pull, which lets you compare loans without affecting your credit score.

More From NerdWallet

Annie Millerbernd writes for NerdWallet. Email: amillerbernd@nerdwallet.com.