The Yosemite Valley Railroad (YVRR) was a short-line railroad in Merced and Mariposa counties, California, that operated from 1907 to 1945. The railroad ran 78 miles (126 km) from Merced along the Merced River canyon to El Portal, on the western boundary of Yosemite National Park. Railroad construction was prohibited within the park, so passengers disembarked at El Portal and continued to Yosemite Valley by stagecoach or, after 1913, by motor stage. Overnight accommodations were available at the Hotel Del Portal until its destruction by fire in 1917.
The YVRR replaced the stagecoach routes that had served Yosemite-bound travelers since the mid-1870s.