Random MAC address generator
Make up to 100 random MAC addresses at once. By default they are locally administered unicast addresses, the kind meant for virtual machines, containers and tests, so they never collide with a manufacturer's range. You can also keep a vendor prefix and randomise the rest.
Runs in your browser: nothing you enter is sent anywhere.
How to use
- Choose how many addresses you need (up to 100).
- Pick the type: Locally administered for VMs and tests, Any unicast, or With vendor prefix and type the prefix.
- Choose the format and letter case.
- Copy the list, or press Generate again for new addresses.
How it works
A MAC address is 6 bytes. The two lowest bits of the first byte are flags:
- bit 0 (I/G): 0 = unicast, 1 = multicast;
- bit 1 (U/L): 0 = universally administered (assigned by a manufacturer), 1 = locally administered.
The generator draws all bytes from crypto.getRandomValues and then sets the flags: for locally administered it clears bit 0 and sets bit 1, for any unicast it clears bit 0 only, and with a vendor prefix it keeps your first three bytes as they are.
Example
A random first byte of 0xA9 is 10101001 in binary. For a locally administered address the generator clears the last bit and sets the one before it: 10101010 = 0xAA. The address might come out as AA:3F:91:0C:7E:25 — its second digit A marks it as local, and the first byte is even, so it is unicast.
Tips
- Hypervisors often use their own prefixes; a locally administered address avoids clashing with them.
- Network tools differ in the format they accept: Linux uses colons, Windows hyphens, Cisco devices dotted groups of four.
- To convert an existing address between formats, use the MAC address formatter.
Frequently asked questions
What is a locally administered MAC address?
One whose second-lowest bit of the first byte is 1, so the second hex digit is 2, 6, A or E (for example 02:… or 3A:…). Manufacturers never use this range, which makes it the safe choice for virtual machines, containers, test networks and MAC randomisation.
What is the difference between unicast and multicast?
The lowest bit of the first byte tells them apart: 0 is unicast (one network interface), 1 is multicast (a group). A device's own address must be unicast, so the generator always clears that bit unless your vendor prefix sets it.
Can I use a real manufacturer prefix?
Yes, type its OUI (the first three bytes) and the last three bytes are random. Such addresses look like real hardware, so use them only on networks you control, where they cannot clash with an actual device.
Are the addresses unique?
Within one list, yes — duplicates are drawn again. With a vendor prefix there are 16.7 million possible addresses, so a clash with another device is unlikely but possible; locally administered addresses have far more room.