What it does
Generates one or more random MAC addresses. You can optionally provide an OUI prefix (the first 3 bytes, e.g. 00:1A:2B) to keep a specific vendor identity, and choose whether the generated address should be "locally administered" (a bit flag that marks a MAC as manually assigned rather than burned-in by a manufacturer).
Try it
How it works
- If you provide an OUI prefix, its 3 bytes are kept fixed; otherwise all 6 bytes are random.
- The remaining bytes are filled with cryptographically random values using
crypto.getRandomValues. - The first byte's bits can optionally be adjusted:
- Locally administered bit (2nd least-significant bit of the first byte) is set to
1when the checkbox is checked, marking the address as manually assigned instead of vendor-assigned. - The multicast bit (least-significant bit) is always cleared so the generated address looks like a normal unicast MAC.
This is handy for lab environments, testing OUI-based MAC lookups (see the MAC OUI Resolver), or generating placeholder device identifiers. Nothing is sent anywhere — everything happens in your browser.