Woking is a relatively modern town that barely existed in its current form before the railway arrived in 1838. The London and South Western Railway chose a route through the rural parish, and the station transformed a scattering of farms into a commuter settlement within a few decades. The speed of the change was remarkable. In 1841, the population was under 2,000. By 1901, it was over 16,000.
The London Necropolis Company, formed in 1852 to address London's desperate shortage of burial space, chose Brookwood in Woking parish for a vast new cemetery. The London Necropolis Railway, opened in 1854, ran dedicated funeral trains from a private station near Waterloo directly to Brookwood Cemetery. At the time it was the largest cemetery in the world, with separate sections for Anglicans, Nonconformists, and later for military dead from both world wars. The cemetery contains graves of all faiths and nationalities, including a large military section maintained by the Commonwealth War Graves Commission.
The Shah Jahan Mosque, built in 1889 by Dr Gottlieb Wilhelm Leitner with funding from the Begum Shah Jahan of Bhopal, was the first purpose-built mosque in Britain. Its Oriental design and peaceful grounds near the canal make it one of Woking's most distinctive buildings. H.G. Wells lived in Woking in the 1890s at Maybury Road, and set the opening of his Martian invasion in "The War of the Worlds" (1898) on Horsell Common, just north of the town centre. The Martians' first cylinder lands on the common, and the early chapters describe Woking and its surroundings in precise topographic detail. A steel Martian sculpture now stands in the town centre as a tribute. The Basingstoke Canal, completed in 1794 to carry agricultural produce, runs through the town and remains navigable for leisure boats.