On this page
The railroad came to this part of the Peninsula a generation before Palo Alto did. When the first train rolled through in 1863, the land where downtown now stands was still farm and pasture. A railroad baron later bought the neighboring ranch, built a university on it and needed a town at its gate. That town grew around a depot. More than 160 years later the trains still stop on University Avenue, now on electric power.
This page follows the line through four eras: the private San Francisco and San Jose Railroad, the long Southern Pacific years, the public rescue that created Caltrain and the 2024 switch to electric trains. For riding tips today, see our guide to riding Caltrain.
A railroad on the third try
San Franciscans wanted a line to San Jose almost as soon as California became a state. A first company formed in 1851, surveyed a route and failed to raise money. A second effort collapsed in 1860 amid charges of fraud on taxpayers. The third, the San Francisco and San Jose Railroad, incorporated on August 18, 1860, with industrialist Peter Donahue, Judge Timothy Dame and auctioneer Henry Newhall as its leading figures.
The counties paid much of the bill. In May 1861 voters in San Francisco, San Mateo and Santa Clara counties approved buying stock. Santa Clara County's share was $200,000. Grading began in Santa Clara County on July 15, 1861. The Civil War made iron scarce. The contractors kept costs down partly by hiring Chinese workers, one of the first railroads in California to do so. The hardest job was a deep cut through Bernal Hill in San Francisco, finished in March 1863.
The first trains, 1863 and 1864
On October 17, 1863, the railroad ran an excursion from San Francisco. About 400 passengers rode six passenger cars behind two locomotives. The train ran to the end of the track at Mayfield, today's California Avenue area, before turning back to Menlo Park for a company picnic. Among the guests was California's governor, Leland Stanford. He was already building the Central Pacific and had no idea yet that his name would one day hang over the farmland outside the window.
The line opened through to San Jose on January 16, 1864, with speeches, a 13-gun salute and a barbecue. Rail cut a trip that took about eight hours by steamboat and stagecoach to about three and a half. By February 1864 the railroad advertised four passenger trains a day each way. A regular freight train followed that June. Valley farmers suddenly had a cheap way to ship fruit and grain to San Francisco.
Mayfield became the local stop. A storekeeper donated land on the main street for the station. The first station building went up in 1869. Our Mayfield page tells how that farm town grew around its depot.
The Southern Pacific years
The independent line did not stay independent long. Southern Pacific acquired it in March 1868. The companies were consolidated as the Southern Pacific in October 1870. Some histories give 1868 for the takeover and others 1870, depending on which step they count. Leland Stanford and his Central Pacific partners controlled the Southern Pacific. Stanford served as its president from 1868 to 1890. The commute line was now, in effect, his railroad. Our page on the Stanford family follows his career.
Southern Pacific ran the Peninsula trains for more than a century. It double-tracked the line in the early 1900s and added shortcuts, including the Dumbarton Cutoff across the bay. Wooden coaches behind small steam engines gave way to heavier trains. Diesel locomotives entered commute service in 1954. The last steam-led commute train left San Francisco on January 22, 1957.
The Mayfield Cutoff
Between 1906 and 1908 Southern Pacific built a branch from Mayfield southwest through Los Altos toward Los Gatos, known as the Mayfield Cutoff. It opened up the west side of the valley and gave a shorter route to Santa Cruz. The Peninsular Railway's electric cars also used part of the route. Passenger service on the northern section ended in early 1964. The rails were pulled up and much of the right of way became Foothill Expressway. Our guide to Los Altos covers the town that grew around its station.
Palo Alto's depots
Palo Alto got its own station only after Stanford's university was under way. The depots tell the town's story in wood and concrete:
- 1890: A flag stop opens to serve the new university. The first structure is an open shelter on posts. It is enclosed as a waiting room in 1893, with a retired boxcar pressed into service for baggage.
- January 1, 1896: A larger $5,500 depot opens, with five wooden arches styled after the sandstone arcades of the campus. It was never popular. Calls to replace it began in the 1920s.
- 1939 to 1941: Southern Pacific moves the tracks 80 feet west and raises them 5 feet. University Avenue is lowered beneath them. The project cost about $700,000, mostly paid by the federal government.
- January 25, 1941: The Streamline Moderne depot opens, designed by Southern Pacific architect John H. Christie. A parade celebrated it on March 8, 1941. A 1944 mural by John McQuarrie decorates the waiting room.
The same year Mayfield's station took the name California Avenue. The 1941 depot joined the National Register of Historic Places on April 18, 1996. Our guides to the Palo Alto station and the California Avenue station cover both stops today.

From commute trains to Caltrain
Long-distance trains stopped at Palo Alto until May 1, 1971, when Amtrak took over intercity service and the Coast Daylight was rerouted through Oakland. The commute trains kept running, but they were losing money. Southern Pacific asked state regulators for permission to drop them in 1977.
The public stepped in. Caltrans took over financial responsibility on July 1, 1980. It paid Southern Pacific to keep running the trains. The service was renamed Caltrain in 1985. In 1991 the Peninsula Corridor Joint Powers Board, formed by San Francisco, San Mateo and Santa Clara counties, bought the right of way from Southern Pacific for $202 million. It took over operations in 1992 and hired contractors to run the trains, ending some 120 years of Southern Pacific operation.
Ridership grew with the tech economy. By a 2018 count, Palo Alto was the second busiest station on the line after San Francisco, with about 7,764 weekday boardings. A third stop beside Stanford Stadium has served game days. See our Stanford stadium station page for its current status.
Electrification in 2024
Southern Pacific talked about electrifying the Peninsula line as early as 1921 and dropped the idea. Caltrans studied it again in 1992. Funding finally came together in the 2010s, with help from the state's high-speed rail program, which plans to share the tracks one day. Crews broke ground at Millbrae on July 21, 2017.
The project strung 25,000-volt overhead wires over the line from San Francisco to San Jose and bought Swiss-built Stadler trains. Caltrain's first electric trains carried passengers on August 11, 2024. On September 21, 2024, the railroad switched to all-electric service between San Francisco and Tamien in San Jose. The program cost about $2.44 billion.
The change mattered in a very local way. For more than a century, steam and then diesel locomotives had passed a few feet from El Palo Alto, the city's namesake redwood beside the creek bridge. Electric trains ended that smoke.

Grade crossings and what comes next
South of California Avenue, Palo Alto's tracks still cross streets at ground level at Churchill Avenue, Meadow Drive and Charleston Road. With more frequent electric trains, gate-down time is rising. The city has spent years studying trenches, viaducts and underpasses. In 2024 it narrowed the choices for some crossings. Expect that debate to run for years. High-speed rail would eventually share the corridor too, though no firm schedule exists for trains reaching the Peninsula.
Good to know
- The 1941 depot's waiting room and its McQuarrie mural are inside the station building at 95 University Avenue.
- Look for the old arches of the 1896 depot only in photos. The building is long gone.
- Electric trains are quiet. Watch and listen at crossings and platform edges.
Frequently asked questions
When did the railroad come to Palo Alto?
The San Francisco and San Jose Railroad ran its first excursion train to the end of its track at Mayfield, now part of Palo Alto, on October 17, 1863. Regular service through to San Jose began on January 16, 1864. Palo Alto itself got a station in 1890, after Stanford University was under way.
Who built the Palo Alto train station?
The current depot was designed by Southern Pacific architect John H. Christie in the Streamline Moderne style. It opened on January 25, 1941, as part of a project that moved the tracks west, raised them and put University Avenue in an underpass. It joined the National Register of Historic Places in 1996.
When did Caltrain go electric?
Caltrain began carrying passengers on its new Stadler electric trains on August 11, 2024. It switched to all-electric service between San Francisco and Tamien on September 21, 2024. The electrification project cost about $2.44 billion.
Why is it called Caltrain?
Southern Pacific ran the Peninsula commute trains for more than a century and tried to drop them in 1977. Caltrans took over the finances in 1980 and the service was renamed Caltrain in 1985. A three-county joint powers board bought the line in 1991 and has run it since 1992.
Was there a train to Los Altos?
Yes. Southern Pacific built the Mayfield Cutoff from Mayfield through Los Altos between 1906 and 1908. Passenger trains on the northern part ended in early 1964 and much of the route became Foothill Expressway.