How to Change Your MAC Address (Win, Mac, Linux)

Try the MAC Generator

Your network adapter ships with a MAC address burned in at the factory, but that address is not set in stone. Every major operating system lets you override it with a value of your choosing — a technique usually called MAC spoofing or simply changing your MAC address.

People do this for plenty of legitimate reasons: testing how a network reacts to a new device, replacing a NIC and needing to keep an old address for licensing, troubleshooting captive portals, or improving privacy on public Wi-Fi. This guide walks through how to change your MAC on Windows, macOS, and Linux, how to generate a valid replacement, and how to put everything back the way it was.

A quick word on ethics and legality. Changing the MAC on a device you own is legal in most places. Using a changed MAC to impersonate another device, bypass paid access, or evade a ban can break terms of service or the law. Only spoof on networks and hardware you are authorized to use.


What You Need First: a Valid MAC Address

Before changing anything, you need an address to change to. Do not just mash the keyboard — a malformed or poorly chosen MAC can fail to apply, collide with another device, or land in a reserved range.

The safest replacement is a locally administered, unicast address. That means:

  • The address is flagged as software-assigned (so it cannot clash with real IEEE-assigned hardware)
  • It is destined for a single device, not a multicast group

In practice, set the second hex digit to 2, 6, A, or E and you have a local unicast address. For example, 02:1a:2b:3c:4d:5e works well.

The fastest way to get one is the random MAC generator: set administration to Local, type to Unicast, pick the format your OS expects, and copy the result. If you want to understand exactly why the local bit matters, see locally vs universally administered MAC addresses.


How to Change Your MAC Address on Windows

Windows has two routes: the Device Manager GUI (works for most adapters) and the registry (for adapters that hide the option).

Method 1 — Device Manager

  1. Press Win + X and open Device Manager.
  2. Expand Network adapters, right-click your Wi-Fi or Ethernet adapter, and choose Properties.
  3. Go to the Advanced tab.
  4. In the property list, select Network Address (sometimes called Locally Administered Address or MAC Address).
  5. Choose Value, enter your new MAC with no separators — for example 021A2B3C4D5E — and click OK.
  6. Disable and re-enable the adapter (or reboot) to apply.

Windows expects the value without colons or hyphens here. If you generated a colon-separated address, strip the colons first.

Method 2 — Registry (when the option is missing)

If Network Address is not listed on the Advanced tab, the adapter driver did not expose it. You can set it in the registry under the network class key (HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}), adding a NetworkAddress string value to the subkey matching your adapter. Editing the registry is riskier — back it up first, and prefer the GUI when it is available.

Verify on Windows

ipconfig /all

Find your adapter and confirm the Physical Address now matches the value you set.


How to Change Your MAC Address on macOS

On macOS you change the MAC from the terminal. Note two caveats: many modern Macs only allow spoofing the Wi-Fi interface (often en0), and Apple's built-in Private Wi-Fi Address feature already randomizes your MAC per network for privacy, so manual spoofing is mostly for testing.

  1. Find your interface name:

    ifconfig

    The Wi-Fi interface is usually en0 or en1.

  2. Disassociate from the current network (without turning Wi-Fi off):

    sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
  3. Set the new MAC (use a colon-separated value):

    sudo ifconfig en0 ether 02:1a:2b:3c:4d:5e
  4. Reconnect to your network.

Verify on macOS

ifconfig en0 | grep ether

The change is temporary — macOS restores the hardware MAC on reboot, which makes it easy to undo.


How to Change Your MAC Address on Linux

Linux gives you the most control. There are three good approaches.

Method 1 — ip (built in, temporary)

sudo ip link set dev eth0 down
sudo ip link set dev eth0 address 02:1a:2b:3c:4d:5e
sudo ip link set dev eth0 up

Replace eth0 with your interface (ip link lists them). This lasts until reboot.

Method 2 — macchanger (convenient randomization)

macchanger is purpose-built for this:

sudo apt install macchanger    # Debian/Ubuntu
sudo dnf install macchanger    # Fedora

sudo ip link set eth0 down
sudo macchanger -r eth0        # fully random MAC
sudo macchanger -a eth0        # random, keep a real-looking vendor prefix
sudo ip link set eth0 up

Use sudo macchanger -p eth0 to reset the interface back to its permanent hardware MAC.

Method 3 — NetworkManager (persistent / per-connection)

To randomize automatically through NetworkManager:

nmcli connection modify "My Wi-Fi" wifi.cloned-mac-address random
nmcli connection up "My Wi-Fi"

Or set a specific value with wifi.cloned-mac-address 02:1A:2B:3C:4D:5E. This survives reboots because NetworkManager re-applies it on every connection.

Verify on Linux

ip link show eth0

How to Revert to Your Original MAC Address

Reverting is straightforward on every platform:

  • Windows: In Device Manager → Advanced → Network Address, select Not Present, then re-enable the adapter.
  • macOS: Simply reboot — the factory MAC returns automatically.
  • Linux: Run sudo macchanger -p eth0, or set NetworkManager's wifi.cloned-mac-address back to permanent, or reboot if you only used a temporary ip link change.

Because most of these changes are temporary by default, a reboot is often the simplest "undo".


Common Pitfalls

  • Wrong separator format. Windows wants the value with no separators in Device Manager; Linux and macOS want colons. Convert before applying — see MAC address formats explained.
  • Forgetting the local bit. If you pick a totally random first byte you might accidentally create a multicast or universal address. Keep the second hex digit at 2, 6, A, or E for a clean local unicast value.
  • Managed networks. Corporate Wi-Fi with 802.1X or MAC filtering may block or flag spoofed addresses. Do not spoof on networks where you are not permitted to.
  • Driver limitations. Some adapters or virtualized NICs ignore MAC overrides. If the change does not stick, the driver may not support it.

FAQ

Is it legal to change your MAC address?

Changing the MAC on hardware you own is legal in most jurisdictions. What can be illegal is how you use it — impersonating another device, bypassing paid or time-limited access, or evading a network ban may violate terms of service or law. Spoof only on devices and networks you are authorized to use.

Does changing my MAC address improve privacy?

It can, on Wi-Fi. A different MAC prevents networks and trackers from recognizing your device by its permanent hardware address. Modern phones and laptops already randomize the MAC per network automatically. For background on how this works, read the MAC address randomization guide. Note that once you are connected, other identifiers and your traffic are still visible, so a changed MAC is only one privacy layer.

What MAC address should I change to?

Use a locally administered, unicast address — set the second hex digit to 2, 6, A, or E so it cannot collide with real factory-assigned hardware. The quickest way to get a valid one is the random MAC generator with administration set to Local. Avoid typing a random value by hand, which risks malformed or reserved addresses.

Will my MAC address change be permanent?

It depends on the method. Device Manager on Windows and NetworkManager on Linux persist across reboots; temporary ifconfig/ip link changes and macOS edits reset on restart. To make a Linux change permanent, configure it through NetworkManager. To make it temporary, use the built-in ip command and simply reboot to revert.

How do I check my current MAC address after changing it?

Run ipconfig /all on Windows, ifconfig en0 | grep ether on macOS, or ip link show eth0 on Linux, and confirm the physical address matches what you set. To learn where these values come from on every platform, see the guide on how to find your MAC address.

Why didn't my MAC address change take effect?

The most common causes are a driver that does not support MAC overrides, using the wrong separator format for your OS, not bringing the interface down and back up, or a managed network rejecting the spoofed address. Try the alternate method for your platform (registry on Windows, macchanger on Linux) and verify the interface was reset before reconnecting.

Generate Random MAC Addresses

Bulk generation up to 10,000 addresses. Multiple formats, vendor prefixes, unicast/multicast.

Open MAC Generator