Area code 540 serves western and northern Virginia, including cities like Roanoke, Harrisonburg, Fredericksburg, and parts of the Shenandoah Valley. It was created in 1995 from a split with area code 703 and has since been overlaid with area code 826. The region is known for its scenic beauty, Civil War history, and a mix of rural and suburban communities. Ten-digit dialing is required. Area code 540 represents Virginia’s rich cultural heritage and growing modernity, covering a diverse swath of the state that balances history with economic development.