Skip to content
UniKit

MAC address generator

Generate random MAC addresses in bulk with an optional vendor prefix (OUI), unicast/multicast bit, local-administered bit, letter case and separator (colon, hyphen, dot or none), plus validation of existing addresses.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Generated addresses

Everything is generated locally in your browser; the unicast and locally-administered switches rewrite the two lowest bits of the first octet.

Letter case
Separator

Validate a MAC address

Format check
Unicast / multicast
Administration
Normalized form

What this tool does

  • Generate a batch of MAC addresses for device testing or virtualised environments: pick a count from 1 to 1000 and paste the output into configs or fixtures.
  • Keep a real vendor prefix: with an OUI such as 00:1A:2B only the last three bytes are random, so the address resolves to that brand in vendor lookups.
  • Craft a specific address type: turn unicast off for a multicast address (low bit of the first octet set), or enable locally administered for 02-prefixed randomised addresses like those phones use.
  • Validate an existing MAC on the side: format, unicast/multicast, locally administered versus globally unique, the normalised form and four separator styles.

Example

Input

Vendor prefix 00:1A:2B, unicast, not locally administered, uppercase, colon separated

Output

00:1A:2B:7C:4E:91

The first three bytes are your OUI and the rest come from crypto.getRandomValues (falling back to Math.random). The two low bits of the first octet are rewritten by the switches, so flags already present in the OUI are overridden.

Frequently asked questions

Can the generated addresses collide?

The last three bytes are 24 random bits, so duplicates within one batch are essentially impossible — but global uniqueness is not guaranteed and they must not be registered as real devices. A genuinely routable address requires an OUI from IEEE.

What exactly do the unicast and locally administered switches change?

They rewrite the two low bits of the first octet: bit0 = 0 means unicast and 1 means multicast; bit1 = 0 means globally unique and 1 means locally administered. Enabling local administration therefore yields first octets like 02, 06 or 0A — the signature of randomised phone MACs.

How many hex digits can the OUI have?

Six or eight, i.e. three or four bytes, with : - . separators or none at all: 00:1A:2B, 001A2B, 00-1A-2B and 001A.2B all work. A wrong length or a non-hex character raises an error.

Why might the generated address resolve to no vendor?

Rewriting the flag bits changes the prefix away from the OUI you typed, and locally administered addresses never belong to a vendor anyway. To keep the prefix lookupable, leave local administration off and unicast on.

Where does the randomness come from, and is anything uploaded?

The browser's crypto.getRandomValues is used first, falling back to Math.random only where it is unavailable. Everything happens locally with no network requests.

Keywords:macmac addressouimac 地址mac 地址生成随机 mac单播本地管理vendor prefix网络工具

Related tools