The UK Government has confirmed plans to electrify the line from Cardiff to Swansea, as part of a UK-wide £9bn investment in the rail network.
The Ebbw Vale, Maesteg, Merthyr Tydfil and the Vale of Glamorgan lines will also be electrified.
Last year, the UK Government announced electrification for the route from London to Cardiff, but held off expanding the work to Swansea, citing the need for a "business case".
When completed, journey times between Swansea and London will be reduced, with longer, cleaner trains in operation.
The Department for Transport said the project will "widen the potential catchment area for businesses seeking to invest in Wales".
The announcement comes a week after the UK Government announced that a direct service from Wales to Heathrow would be in operation by 2021.