Dunfermline is a town and former Royal Burgh, and parish in Fife, Scotland. The earliest known settlements in the area around Dunfermline probably date as far back as the Neolothic period.

The town is a major service centre for west Fife. Dunfermline retains much of its historic significance, as well as providing facilities for leisure.