Japan has an increasing number of vacant homes — a problem that's set to persist because of an aging and shrinking population that has left many towns and villages empty.

"Japan faces significant economic and social impact effects from demographic (aging) over the next three decades," Rajiv Biswas, Asia-Pacific chief economist at IHS Markit, wrote in an October note.

Abandoned properties in the world's third-largest economy are among the least-discussed side effects of the country's demographic changes. But it's getting more attention given the increasing number of affordable — and sometimes free — houses put up for sale online on websites called "akiya banks."

Akiya is the Japanese term for vacant homes. Many of such sites are set up by local governments and communities to better manage the supply and demand for the growing stock of empty houses in their respective towns.

Properties listed on Tochigi's "akiya bank"

On one website, several homes are free, with the buyer having to pay only taxes and fees such as agent commissions.

"This is usually because the owners cannot take care of the property anymore or do not want to pay the property tax that applies in Japan for a home that they do not use," said real estate site REthink Tokyo in an October report.

The free homes also usually require major refurbishment because they are old and run down. But some local governments — such as the Tochigi and Nagano prefectures — offer subsidies for renovation work on vacant houses.

For vacant homes that are not free, prices can range from 500,000 Japanese yen ($4,428.50) to close to 20 million yen ($177,140) depending on location, age and condition of the house, according to the listings seen by CNBC.