The 540 area code serves western and northwestern Virginia, covering Roanoke, the Shenandoah Valley, and Fredericksburg. Created in 1995 in a split from Northern Virginia’s 703 code, it is now overlaid by area code 826. If a 540 number has appeared on your caller ID, this guide explains where it comes from, how to dial it, and how to stay safe from spoofed calls.
Quick Summary: Area Code 540 at a Glance
| Detail | Information |
|---|---|
| Area Code | 540 |
| State | Virginia (VA) |
| Major Cities | Roanoke, Harrisonburg, Winchester, Fredericksburg |
| Time Zone | Eastern Time (ET) |
| Country Code | +1 (USA) |
| Overlay Codes | 826 (co-located) |
Geographic Coverage & Major Cities
Area code 540 covers a large arc of western and northwestern Virginia, from Roanoke and Blacksburg in the southwest, up the Shenandoah Valley through Harrisonburg and Winchester, over to Fredericksburg.
- Roanoke – the largest city in western Virginia, in the Blue Ridge Mountains
- Harrisonburg – home of James Madison University in the Shenandoah Valley
- Blacksburg – home of Virginia Tech
- Winchester & Fredericksburg – historic northern Virginia cities
From the Blue Ridge and Shenandoah Valley to college towns and Civil War history, a 540 number is closely tied to the identity of western Virginia.
A Brief History of Area Code 540
Area code 540 was created in 1995 in a split from the 703 code, taking western and northwestern Virginia. In 2001, the far southwestern counties split off into the 276 code. The 826 overlay was added over the 540 region in 2022, and 10-digit dialing became mandatory.
Time Zone & Best Time to Call
Numbers in the 540 area code use Eastern Time (ET). The region observes Daylight Saving Time, shifting from EST (UTC-5) to EDT (UTC-4) between March and November each year.
How to Dial Phone Numbers in Area Code 540
Because 540 shares its region under an overlay, the area requires 10-digit dialing on every call.
Calling within the United States or Canada
- 10-digit dialing: Include the area code – 540-XXX-XXXX.
- 11-digit dialing: You can also dial 1-540-XXX-XXXX; the leading 1 is the NANP country code.
Calling from outside the United States
- Format: [exit code] + 1 + 540 + XXX + XXXX
- From the UK, Europe, or most of Asia/Africa: 00 1 540 XXX XXXX
- From any mobile phone worldwide: +1 540 XXX XXXX
Is Area Code 540 a Scam? Safety & Protection Tips
Area code 540 is a legitimate Virginia area code – a call from it is not fraudulent by default. However, scammers frequently spoof local codes like 540, faking the caller ID so their number appears to come from a trusted local line. Neighbor spoofing, which mimics the first six digits of your own number, is especially common.
Common scam tactics linked to this region
| Scam type | What to watch for |
|---|---|
| Government impersonation | Callers posing as the IRS or SSA threatening arrest or fines |
| Bank & card fraud alerts | Claims of suspicious activity seeking your account details |
| Student & scholarship scams | Fake tuition or financial-aid calls targeting Virginia Tech or JMU students |
| Utility shut-off threats | Fake Appalachian Power or Dominion Energy disconnection demands |
How to report, block, and look up 540 callers
- Never share personal or financial details with an unexpected caller, however urgent they sound.
- Block the number using your phone’s built-in call-blocking feature or a reputable call-screening app.
- Look up the number with a trusted reverse phone lookup before returning any call.
- Report it to the FTC at reportfraud.ftc.gov and register at DoNotCall.gov.
Nearby & Related Area Codes in Virginia
Area code 540 shares and borders several other Virginia codes:
- 826 – the overlay that shares western Virginia with 540 (see our 826 area code guide)
- 703 & 571 – Northern Virginia to the northeast, from which 540 split (see our 703 area code guide)
- 276 – southwestern Virginia to the southwest, split from 540 (see our 276 area code guide)
- 434 – Charlottesville and south-central Virginia to the southeast (see our 434 area code guide)
Explore more codes across the state on our Virginia area codes hub, or browse every prefix in our US area codes directory.
↑ See the complete list of All US Area Codes by State – every area code across all 50 states in one directory.
Explore Neighboring States
Researching area codes just across the state line? Start with these codes in the states that border Virginia:
- Maryland – area code 410
- North Carolina – area code 704
- Tennessee – area code 615
- Kentucky – area code 502
- West Virginia – area code 304
Frequently Asked Questions About Area Code 540
Where is the 540 area code located?
Area code 540 covers western and northwestern Virginia, including Roanoke, Harrisonburg, Winchester, and Fredericksburg. It operates on Eastern Time and is overlaid by area code 826.
What is the difference between 540 and 826?
There is no geographic difference. 826 is an overlay covering the exact same western-Virginia territory as 540; it was added in 2022 simply to supply more phone numbers.
Is 540 a landline or cell phone area code?
Both. Area code 540 serves landlines, mobile phones, and VoIP numbers throughout western Virginia.
Should I answer a call from an unknown 540 number?
If you are not expecting the call, let it go to voicemail. Legitimate callers leave a message, while spoofed or robocall numbers usually will not. Verify any unfamiliar number with a reverse lookup before calling back.
Related 540 Guides
- Is a 540 call safe? Read Is area code 540 a scam? Spam & safety guide.
- Worried about spam or robocalls? Browse our Scam Alerts directory.