The Wilts, Somerset and Weymouth Railway (WS&WR) was an early railway company in south-western England. It obtained Parliamentary powers in 1845 to build a railway from near Chippenham in Wiltshire, southward to Salisbury and Weymouth in Dorset. It opened the first part of the network but found it impossible to raise further money and sold its line to the Great Western Railway (GWR) in 1850.
The GWR took over the construction and undertook to build an adjacent connecting line; the network was complete in 1857. In the early years of the 20th century the GWR wanted to shorten its route from London to the West of England and built "cut-off" lines in succession to link part of the WS&WR network, so that by 1906 the express trains ran over the Westbury to Castle Cary section. In 1933 further improvements were made, and that part of the line was established as part of the "holiday line" to Devon and Cornwall.
The network was already a major trunk route for coal from South Wales coalfields to southern England, and for Channel Islands farm produce imported through Weymouth Harbour, as well as providing a boat train route, and carrying flows from Bristol to Southampton and Portsmouth.
Much of the network is in operation today, but the Devizes and Radstock branches have closed.