MAC Address Generator

Generate cryptographically random MAC addresses with configurable separator, case, quantity, and first-octet bit flags.

Uppercase Letters
Locally Administered

Sets bit 1 of the first octet (LAA)

Unicast

Clears bit 0 of the first octet (unicast vs. multicast)

Configure options and click Generate to create MAC addresses

MAC Address Generator

A MAC (Media Access Control) address is a 48-bit hardware identifier assigned to network interfaces for communication at the data link layer. It is represented as six groups of two hexadecimal digits, separated by colons or hyphens (e.g., AA:BB:CC:DD:EE:FF). This generator uses the browser's built-in Web Crypto API to produce cryptographically random MAC addresses, with full control over the separator style, letter case, and first-octet bit flags.

The first octet of a MAC address encodes two critical bits: bit 0 (LSB) determines unicast (0) vs. multicast (1), and bit 1 indicates a globally unique OUI-based address (0) or a locally administered address (1). Locally administered MACs are useful for virtual machines, containers, and testing environments where you need randomized addresses that will never conflict with real hardware identifiers registered by manufacturers.

How it works

Each MAC is 6 bytes of cryptographic random data (crypto.getRandomValues). First-octet bit masking: bit 0 cleared → unicast; bit 1 set → locally administered. Bytes are formatted as two-hex-digit groups joined by the chosen separator (colon, hyphen, or none), then optionally uppercased.

Use cases

  • Generating test MAC addresses for network simulation and lab environments
  • Assigning random MACs to virtual machines and Docker containers
  • Populating database seeds and mock network device inventories
  • Testing network access control (NAC) and MAC filtering rules
  • Creating anonymized MAC addresses for privacy-focused network configurations

Frequently asked questions

What is a MAC address?

A MAC (Media Access Control) address is a 48-bit hardware identifier assigned to a network interface for communication at the data link layer. It is written as six groups of two hexadecimal digits, separated by colons or hyphens, such as AA:BB:CC:DD:EE:FF. Each byte is two hex digits, so a full address is 12 hex characters.

What format does a MAC address use?

A MAC address consists of six octets shown in hexadecimal, most commonly joined by colons (AA:BB:CC:DD:EE:FF) or hyphens (AA-BB-CC-DD-EE-FF). Some systems, such as Cisco devices, use three groups of four digits separated by dots. This generator lets you pick the separator, choose upper or lower case, and generate several addresses at once.

What is a locally administered MAC address?

A locally administered address is one you assign yourself rather than one burned in by the manufacturer, and it is flagged by setting bit 1 of the first octet to 1. These are ideal for virtual machines, containers, and test labs because they will not collide with real OUI-registered hardware. This generator can force that bit so every result is safely locally administered.

How are random MAC addresses generated here?

Each address is built from 6 bytes produced by the browser's Web Crypto API (crypto.getRandomValues), which provides cryptographically strong randomness. The first octet can be masked so bit 0 is cleared for a unicast address and bit 1 is set for a locally administered one. All generation happens client-side, so no data ever leaves your device.

What do the first-octet bits mean in a MAC address?

The least significant bit of the first octet (bit 0) marks the address as unicast when 0 or multicast when 1, and the next bit (bit 1) marks it as globally unique OUI-based when 0 or locally administered when 1. Setting these flags correctly ensures a generated address behaves as a normal, conflict-free interface identifier.

Related Calculators