MAC address generator

What is a Mac Address Generator?

Virtual machines, containers, network simulators and test fixtures often need MAC addresses that are valid and do not collide. This generator creates any number of random MAC addresses, optionally starting with a prefix of your choice, in the case and format you need.

How to use it

  1. Enter how many addresses you need.
  2. Optionally enter a prefix, for example a vendor OUI or a locally administered prefix.
  3. Choose uppercase or lowercase and the separator.
  4. Copy the list.

Choosing a safe prefix

For lab and virtual use, the best choice is a locally administered, unicast address. That means the second hex digit of the first byte is 2, 6, A or E, for example 02:xx:xx:xx:xx:xx. These addresses are reserved for local assignment and will never clash with a real manufacturer's hardware address.

  • Unicast: the lowest bit of the first byte must be 0. An odd first byte, such as 01:, is a multicast address and must not be assigned to an interface.
  • Vendor OUIs: hypervisors use their own ranges, for example 52:54:00 for QEMU/KVM, 00:50:56 for VMware and 00:15:5D for Hyper-V. Use them only if a tool expects them.

Example output with prefix 02:42

02:42:7f:1c:9a:03
02:42:e5:30:44:bd
02:42:0b:d2:6e:91

Docker uses the 02:42 prefix for container interfaces.

Tips

  • Generated addresses are random, so duplicates are extremely unlikely but possible in very large sets; deduplicate if uniqueness is critical.
  • Do not use generated addresses to impersonate other devices on networks you do not control.

Frequently Asked Questions

Which MAC prefix is safe for virtual machines?

A locally administered unicast prefix, where the first byte is 02, 06, 0A or 0E or similar, avoids clashes with real hardware.

What makes a MAC address multicast?

If the lowest bit of the first byte is 1, meaning the first byte is odd, the address is multicast and cannot be assigned to an interface.

Can generated MAC addresses be duplicates?

It is very unlikely but possible in large batches. Remove duplicates if uniqueness is essential.

What prefix does Docker use?

Docker typically assigns container MAC addresses starting with 02:42.