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, which last year was acquired by LendingTree.

Traditional banks are flush with cash, he said, and aren’t having to compete for deposits by raising rates. Online banks — and even some smaller traditional banks — are looking for money to fund growth and are courting customers, who can easily shop online for the best rates.