Families are socking away more money in 529 college savings plans than ever, investing a record $253 billion last year in preparation for the sky-high cost of higher education, according to a report released Tuesday by the College Savings Plans Network.

The advantage to 529 plans — named for a section of the U.S. tax code — is that families can invest through such accounts without the earnings being taxed, so long as the funds ultimately are used to pay for college expenses. Earnings on the investments typically are free from federal and state taxes, and grandparents, aunts, uncles and anyone else can contribute to the accounts.

Yet government data shows that less than 3 percent of U.S. families make use of tax-advantaged college accounts. It appears from the new report that that’s starting to change, albeit slowly.

In 2015, the total number of 529 accounts rose 3.6 percent over the prior year to 12.5 million, according to the College Savings Plans Network (CSPN). The amount of money families poured into the plans increased by $25 billion, with more than half of all accounts receiving contributions. Assets grew by $5.3 billion, though the average size of the plans contracted 1.4 percent — to $20,190 — due to the turbulent performance of the financial markets.

“Even in a market investment environment like we had last year, which was basically flat — some people made a little money, some people were down a little bit — we still had an increase in the number of accounts that were open,” said Young Boozer, chair of CSPN and Alabama State Treasurer. “That shows there’s a recognition and an understanding that this is the best way to save for college expenses.”

Families in the Washington region were especially keen on college savings plans; there were 2.4 million people signed up for Virginia’s 529 plans in 2015, nearly 4 percent more than a year earlier, bringing the total amount under management to $54 billion. In the District, people opened 3,109 new accounts, and Maryland recorded a 7 percent increase in total funded college investment accounts in 2015, with $4.1 billion in assets, up 4 percent from the prior year.

“There is just more awareness of student debt and the impact it can have on future finances,” said Lauren J. Shipley, executive director of College Savings Plans of Maryland. “You are starting to see the generation of families where the mom and the dad have their own student loan debt, and are starting to say ‘I don’t want this for my kids.’ It’s become more of an urgency to save.”

While college price increases have slowed in recent years, the amount of money families are expected to pay remains high. One year at a four-year public university, including tuition, fees, and room and board, cost an average $14,120 for a full-time, in-state student in 2015-2016 — and that’s after taking grants, scholarships and tax credits into account, according to the College Board. At private nonprofit colleges, the average net price is almost double, at $26,400.

If the average total cost of college continues to climb at the current rate of 6 percent a year, the parents of an eight-year-old might have to fork over more than $25,200 to cover expenses during freshman year at a public university a decade from now.

“Millennials are going to be better savers than their parents or their grandparents,” said Mary G. Morris, chief executive of Virginia 529 College Savings Plan. “They are a little bit nervous about things because of their experience during the recession, which is making them better savers and better planners.”

Stark projections of college costs have made 529 plans a critical tool for families. The most popular plans work much like a 401k retirement account, with contributions invested in stocks, bonds or money market funds. Earnings are not subject to federal taxes so long as the money goes toward “qualified education” expenses — including tuition, books, fees, room and board — at any accredited school.

Affluent parents make the most use of the accounts; nearly half of the families with 529 plans make more than $150,000 a year and have median assets of $413,000 — 25 times higher than the assets for families without the plans, according to a 2012 report from the Government Accountability Office. A more recent survey conducted by Strategic Insight, a mutual fund research firm, suggests the profile is starting to change. Researchers estimate that 70 percent of current account holders earn less than $150,000, while another 10 percent have incomes below $50,000.

States, which sponsor most 529 plans, have been offering more income tax breaks to encourage families to invest. There are even 15 states, including Colorado, Nevada and Maine, that will match college savings up to a certain dollar amount or provide income tax credits to get low- to moderate-income residents to participate in their plans.

Because there are so many plans available, financial advisers recommend families compare the tax benefits and fees before making a selection, said Mark Kantrowitz, the publisher of Cappex.com, a website that connects students with scholarships and colleges.

Families should research plans in their home state first to take advantage of local tax deductions, but not all states offer tax benefits to residents. The District, for example, offers income tax deductions on contributions of up to $4,000 a year for individual and up to $8,000 for a married couple, but only money put into the plan by the account owner is deductible.

Fees can erode a lot of the tax advantage of investing in a 529 plan. Most states no longer charge enrollment fees, though a majority require an initial contribution of at least $25 and minimum monthly deposits of $15. There are a number of states that waive or reduce fees for residents or account holders who sign up for automatic contributions.

Maryland charges an annual account fee of $10 for accounts that don’t have automatic contributions or a minimum of $25,000, Shipley said. The state’s plans, which are managed by T.Rowe Price, routinely rank among the best in the nation by Morningstar, a fund research firm that puts out an annual review of college savings plans. Maryland’s plans have relatively low expense ratios, ranging from 0.11 percent to 0.80 percent.

“When your child is young, having lower fees matters more than having the state income tax deduction. When college is just a few years away, the deduction matters more,” Kantrowitz said. “Fees are assessed on the whole balance of the plan, whereas the state income tax deduction is just that year’s contributions, so a little bit of difference in the fees over 17 years adds up to a lot more than having the state income tax benefit.”

Some plans charge as much as 2.78 percent of assets as a management fee, according to the GAO, but most plans these days charge less than half a percent. Kantrowitz said the best plans are those purchased directly from a state sponsor, known as direct-sold, because they come with lower or fewer fees than plans purchased through a broker working on commission.

Want to read more about paying for college? Check out these stories: