After years of anemic rates, savings accounts are finally offering interest that approaches the rate of inflation — especially if they're digital.

Online banks, in particular, are offering more competitive savings rates, often close to or even exceeding 2 percent on federally insured deposits. Though hardly breathtaking, those yields are far better than the minuscule rates below 1 percent that many big, traditional banks are still offering.

"Online rates have been going up at a much faster rate," said Nick Clements, a co-founder of the financial website MagnifyMoney.

Traditional banks are flush with cash, he said, and aren't having to compete for deposits by raising rates. Online banks are looking for money to fund growth and are courting customers.

Before you move your cash to a higher-yielding account, it's best to check the details, because accounts with some of the most attractive rates may come with a few asterisks. Marcus, the consumer lending arm of Goldman Sachs, is offering an online savings account with a rate of 1.80 percent, with no minimum deposit. But the account doesn't come with a debit or ATM card. Withdrawals must be done electronically to another bank account, through the automated clearinghouse network. Such transfers can take a couple of days, so consider how quickly you expect to want your cash.

Synchrony Bank's rate on its high-yield savings account is slightly lower at 1.75 percent, but it offers an ATM card for quick access.

Some banks may offer high rates, but require relatively large deposits or balances. Northpointe Bank in Grand Rapids, Mich., is offering 1.95 percent for 12 months, with a minimum balance of $25,000.

If you have cash on hand — whether it's an emergency reserve, a down payment fund or a lump sum from the sale of a house that needs to be parked temporarily — it's worth checking around for higher rates online, said Greg McBride, chief financial analyst at Bankrate.

Higher interest rates may be an incentive to start an emergency fund. In a recent Bankrate survey, about a quarter of the respondents said they had no emergency savings.

While setting up a new account may seem like a hassle, money sitting in a savings account earning 0.01 percent, which is still the rate at some large banks, is losing purchasing power, McBride said.

"It's the first time in a decade" that savers are in a position to earn a yield on their savings that is comparable with inflation, he said.

Ann Carrns writes for the New York Times.