FormatterHQ

Random MAC Address Generator

Generate random MAC addresses for virtual machines, containers, test data and documentation, in colon, hyphen, Cisco dot or plain format.

Loading tool…
Ready.

How to use the Random MAC Address Generator

  1. Choose how many MAC addresses to generate.
  2. Pick a format: colons, hyphens, Cisco-style dots or no separator.
  3. Choose uppercase or lowercase and keep the locally administered option on unless you have a reason not to.
  4. Generate and copy the addresses.

What is a MAC address?

A MAC (media access control) address is the 48-bit hardware identifier of a network interface, written as six bytes in hexadecimal. Manufacturers assign addresses from blocks they own: the first three bytes, the OUI, identify the vendor. This random MAC address generator creates addresses for virtual machines, containers, lab networks and test data.

Formats

Colon (Linux, macOS):   6A:3F:0B:C2:91:E4
Hyphen (Windows):       6A-3F-0B-C2-91-E4
Cisco dot notation:     6a3f.0bc2.91e4
No separator:           6A3F0BC291E4

Unicast and locally administered bits

Two bits in the first byte have special meaning:

  • Bit 0 (I/G) – 0 means unicast (one device), 1 means multicast. The generator always clears it, because a network card must not use a multicast address.
  • Bit 1 (U/L) – 0 means universally administered (assigned by a vendor), 1 means locally administered (set by software or an administrator).

With the locally administered option on (the default), the second hex digit of every address is 2, 6, A or E. Such addresses cannot clash with real hardware, which is why hypervisors, container runtimes and phone privacy features use them. Turn the option off only if you specifically need addresses that look vendor-assigned; they may then collide with real vendor prefixes.

Common uses for a random MAC address generator

  • Assigning stable MAC addresses to virtual machines in libvirt/KVM, VirtualBox or Hyper-V configurations.
  • Testing MAC address validation and normalization code, which must accept all four formats above.
  • Seeding network inventory, DHCP reservation or asset-management demo data.
  • Documentation and screenshots that should not reveal real hardware addresses.

Reading the vendor prefix

In a vendor-assigned address such as 00:1A:2B:3C:4D:5E, the first three bytes (00:1A:2B) form the OUI registered with the IEEE, and the last three are chosen by the manufacturer. Because generated addresses have the locally administered bit set, an OUI lookup will not match any vendor, which is exactly what you want for test data.

Applying a generated address

# Linux: change an interface's MAC (bring it down first)
ip link set dev eth0 down
ip link set dev eth0 address 02:1a:2b:3c:4d:5e
ip link set dev eth0 up

# QEMU/KVM guest network card
-device virtio-net-pci,netdev=n0,mac=52:54:00:12:34:56

# Docker container
docker run --mac-address 02:42:ac:11:00:02 nginx

QEMU's conventional prefix 52:54:00 is itself locally administered: 0x52 is binary 01010010, so the U/L bit is set and the I/G bit is clear. A change made with ip link lasts until the next reboot unless you also add it to your network configuration.

Good to know

MAC addresses are only meaningful within a local network segment and are not sent across the internet. Changing the MAC address of your own device may break DHCP reservations or network access policies, and some networks prohibit it, so only use generated addresses in environments you manage.

Build a full set of network test data with the random IP address generator, or convert values between bases with hex to binary to inspect the individual bits.

Frequently asked questions

What does locally administered mean?
It means the address was assigned by software or an administrator rather than burned in by a manufacturer. It is marked by the second-lowest bit of the first byte, so the second hex digit is 2, 6, A or E.
Will a random MAC address conflict with a real device?
Locally administered addresses never overlap with vendor-assigned hardware addresses. Two random addresses could still match by chance within your own network, but with 46 random bits this is very unlikely.
Which format should I use?
Use colons for Linux, macOS and most configuration files, hyphens for Windows, and dot notation for Cisco devices. All represent the same six bytes.
Can I generate multicast MAC addresses?
No. The generator always produces unicast addresses, because multicast addresses cannot be assigned to a network interface.

Last updated October 3, 2026

Related tools

IP Address Lookup Look up the approximate country, region, city, time zone and network (ASN) of any public IP address, from a local database. Website to IP Address Find the IP address a website points to from its link, with plain-English notes on CDNs, shared hosting and changing results. Random Name Picker Pick one or more random winners from a list of names — fair, secure and without repeats. Random Number Generator Generate random whole numbers in a range, with options for unique values and sorting. Random Prime Number Generator Generate random prime numbers within any range up to one trillion. Random String Generator Generate random strings of any length from letters, digits, hex, URL-safe or custom character sets. Random Time Generator Generate random times of day in 24-hour or 12-hour AM/PM format, with or without seconds. Random TSV Generator Generate realistic fake TSV test data — names, emails, addresses, dates and more — with custom fields. Random Username Generator Generate random usernames and gamertags from word combinations or names, with optional numbers. Random Word Generator Generate random English words — nouns, verbs, adjectives or adverbs — for games, writing prompts and naming. Random XML Generator Generate realistic fake XML test data — names, emails, addresses, dates and more — with custom fields. ULID Generator Generate sortable ULIDs (Universally Unique Lexicographically Sortable Identifiers) with monotonic ordering, in bulk, using secure randomness.