This review article presents a description of contemporary developments and findings related to the different elements needed in future 4th generation district heating systems (4GDH). Unlike the first three generations of district heating, the development of 4GDH involves meeting the challenge of more energy efficient buildings as well as the integration of district heating into a future smart energy system based on renewable energy sources. Following a review of recent 4GDH research, the article quantifies the costs and benefits of 4GDH in future sustainable energy systems. Costs involve an upgrade of heating systems and of the operation of the distribution grids, while benefits are lower grid losses, a better utilization of low-temperature heat sources and improved efficiency in the production compared to previous district heating systems. It is quantified how benefits exceed costs by a safe margin with the benefits of systems integration being the most important.