ModernCalcs

Random MAC Address Generator

Generate random MAC addresses with correct locally-administered/unicast bit handling, in any common format.

Random MAC Address Generator: Valid, Not Just Random-Looking

A MAC address isn't just 48 random bits — its first byte encodes two meaningful flags: whether the address is locally administered or vendor-assigned, and whether it's unicast or multicast. This generator sets those bits correctly based on your choices, then randomizes the rest, so every generated address is both well-formed and clearly a test/local address rather than an accidental collision with a real device.

Formula
First byte: bit 1 (0x02) = locally administered, bit 0 (0x01) = multicast; remaining 40 bits random

A fully random first byte would produce an invalid or misleading combination roughly half the time.

Why the First Byte Is Special

The two least-significant bits of a MAC address's first octet aren't part of the random address space — they're control bits. Bit 0x02 set means 'locally administered' (not tied to any registered manufacturer OUI); bit 0x01 set means 'multicast' (a group address, not a single device). Getting these bits right is what separates a genuinely valid test MAC address from a string of hex digits that merely looks like one.

Why Locally-Administered Is the Safer Default

Globally-unique MAC addresses draw their first three bytes from a specific manufacturer's IEEE-registered OUI (Organizationally Unique Identifier). Generating a random address without the locally-administered bit set risks it accidentally matching a real vendor prefix, implying a device manufacturer that doesn't actually correspond to your generated address. Setting the locally-administered bit sidesteps this entirely.

Format Conventions Across Vendors

Most networking documentation and Unix-style tools use colon-separated hex pairs (aa:bb:cc:dd:ee:ff). Windows tooling often prefers hyphens (aa-bb-cc-dd-ee-ff). Cisco IOS traditionally displays addresses as three dot-separated groups of four hex digits (aabb.ccdd.eeff) — this tool supports all three so the output matches whatever system you're testing against.

Practical Examples

Generating Test Device MACs

Safe, locally-administered unicast addresses.

  • 1.Locally administered: checked
  • 2.Multicast: unchecked
  • 3.Format: colon-separated

Testing Cisco Config Parsing

Matching IOS-style formatting.

  • 1.Format: Cisco dot notation
  • 2.Result: aabb.ccdd.eeff style addresses

What Gets Set Correctly

  • Locally administered bit: avoids real vendor OUI collisions
  • Unicast/multicast bit: matches your selected address type
  • Remaining 40 bits: cryptographically random

Good Use Cases

  • Generating test device identifiers for network simulation
  • Populating sample data for a device inventory system
  • Testing MAC address parsing/validation logic
  • Generating addresses formatted for a specific vendor's tooling

Frequently Asked Questions

What does 'locally administered' mean?

MAC addresses have a bit that distinguishes globally-unique addresses (assigned by a manufacturer from their registered OUI) from locally-administered ones (assigned locally, not tied to any real vendor). Generating a random address as locally-administered avoids the (small but real) chance of colliding with an actual manufacturer's registered range.

What's the unicast/multicast bit?

The least significant bit of a MAC address's first byte distinguishes a unicast address (destined for one specific device) from a multicast address (destined for a group of devices). Most 'device address' use cases want unicast; multicast is for specific group-communication protocols.

Why does the tool force these two bits instead of generating fully random bytes?

A truly random first byte would produce an invalid or misleading address roughly half the time — either claiming to be a real vendor-assigned address (when it isn't) or being multicast when a unicast device address was intended. Setting these bits explicitly, then randomizing the rest, produces addresses that are both valid and clearly marked as generated/test addresses.

What's the Cisco dot format?

Cisco networking equipment traditionally displays MAC addresses as three groups of four hex digits separated by dots (like aabb.ccdd.eeff) rather than the more common six groups of two hex digits — this tool supports that format alongside the standard colon and hyphen notations.

Can these addresses collide with a real device's MAC?

Extremely unlikely with the locally-administered bit set, since that explicitly marks the address as not from any manufacturer's registered range — real devices don't (or shouldn't) use locally-administered addresses by default.

Is my data sent anywhere?

No, generation happens entirely in your browser using the Web Crypto API's random number generator — no upload.