A MAC address is a 48-bit identifier that every network interface uses at the link layer, and you can read the active ones for your machine with getmac or ipconfig /all from the Windows command prompt. Those commands only return the burned-in hardware addresses already attached to your physical adapters, however, so they cannot supply the values you need for test fixtures, virtual machine definitions, configuration files, API mocks, lab environments, or sample documentation. When your goal is to feed realistic-looking but locally controlled MAC examples into a test suite, the faster path is a dedicated in-browser generator. The MAC Address Generator creates 1 to 20 random locally administered unicast 48-bit addresses per click, formats each one in your preferred separator and case style, and runs entirely on the client without touching any adapter, scanning the network, or claiming a vendor OUI. Because the source bytes come from the browser's Web Crypto API, each batch is freshly sampled and never reused across runs unless you copy the same line back in.

What getmac and ipconfig /all really return
The Windows command prompt carries two well-known commands for inspecting link-layer identity. getmac prints the Physical Address of every active transport, prefixed by the transport name in brackets, while ipconfig /all dumps a larger block per adapter including DHCP lease data, IPv4 and IPv6 stacks, DNS servers, and the same Physical Address line. Both rely on the network stack to query the operating system's installed adapters, so they only know about hardware that the OS has already enumerated. That is exactly what you want when diagnosing a real machine, but it is also a hard ceiling on what those commands can give you.
For developers, that ceiling is the problem. A test suite cannot depend on the developer's Wi-Fi adapter, and a VM template cannot ship with a MAC borrowed from the build host. You need values that look like real 48-bit identifiers, are unlikely to collide with production hardware, and behave predictably when a switch or hypervisor inspects them. The MAC Address Generator is built for exactly that need.
| Source | Returns | Best for |
|---|---|---|
| getmac in CMD | Hardware MAC of every active transport | Diagnosing the physical adapters on one machine |
| ipconfig /all in CMD | Full adapter details plus the Physical Address line | Inspecting DHCP, DNS, and link-layer identity together |
| MAC Address Generator | 1 to 20 random locally administered unicast 48-bit values | Test fixtures, VM definitions, lab configs, sample docs |
When a developer needs random MAC addresses
Several everyday engineering tasks require stable but disposable MAC values:
- Unit and integration tests that build a synthetic frame, packet, or DHCP lease.
- Virtual machine templates and Terraform or Ansible inventories that need a placeholder MAC before a real one is assigned.
- Documentation, tutorials, and screenshots where a recognizable example is safer than a real customer's hardware address.
- Fuzz testing for parsers, switches, and routers, where each iteration should receive a fresh input without exhausting a tiny namespace.
- Lab topologies that spin up dozens of nodes at once and need values that will not collide with the operator's actual devices.
The common thread is that none of these scenarios want the burned-in address of a NIC, and none of them want a value that claims to belong to a real vendor's IEEE-assigned OUI.
Generate local test MAC addresses
The MAC Address Generator produces 1 to 20 addresses per run, formatted in the style your fixture expects. Everything happens in the browser, so the values never leave your machine and no adapter is reconfigured.
- Open the MAC Address Generator and decide how many addresses you need, anywhere from 1 to 20.
- Pick an output format: colon-separated 02:1A:2B:3C:4D:5E, hyphen-separated 02-1A-2B-3C-4D-5E, or plain hexadecimal 021A2B3C4D5E.
- Choose uppercase or lowercase letters for the hex digits so the output matches the consumer of your fixture.
- Select Generate local MAC addresses; the six bytes per entry are sampled fresh from the browser's Web Crypto API.
- Copy the lines into your test, config, or documentation, and check for duplicates against your own allocation system before treating them as authoritative.
Each result is six octets wide, which is exactly 48 bits, and the first octet is normalized so the address cannot be confused with a multicast frame or a vendor OUI claim.
How the local unicast bit pattern works
IEEE registration controls two bits in the very first octet of every MAC. The Individual/Group bit, which is the least significant bit of the first octet, tells the receiver whether the frame is destined for one station or a group. Clearing that bit keeps every generated value in unicast space. The Universally/Locally administered bit, which is the second-least significant bit of the first octet, distinguishes an IEEE-assigned OUI from a value chosen by an administrator. Setting that bit announces that the address is locally controlled and does not belong to any registered vendor.
With 46 bits of entropy per address, the total address space is 2^46, which equals 70,368,744,177,664 possible values, or roughly 70 trillion. For a batch of 20 random values drawn from that space, the probability of any collision by the birthday bound is on the order of N(N−1) / (2 × 2^46), which works out to roughly 380 / 140,737,488,355,328, or about 2.7 × 10−12. That is vanishingly small, but it is still not zero. The IEEE Guidelines for Use of EUI, OUI, and CID treat the locally administered flag as the correct signal for values chosen by an operator rather than assigned by a registry, and IETF RFC 7042 recommends the same pattern for protocols that synthesize link-layer identifiers.
You can verify the result by hand on a sample line. The first byte's binary representation should always have the second bit from the right as 1 and the rightmost bit as 0. For example, 02 in binary is 0000 0010, so the U/L bit is set and the I/G bit is clear; 0A is 0000 1010, which also satisfies the rule.
| First octet (hex) | Binary | U/L bit (bit 1) | I/G bit (bit 0) | Type |
|---|---|---|---|---|
| 02 | 00000010 | 1 | 0 | Local unicast |
| 0A | 00001010 | 1 | 0 | Local unicast |
| 00 | 00000000 | 0 | 0 | Universal unicast |
| 03 | 00000011 | 1 | 1 | Local multicast |
Pick the right format for your fixture
Different downstream tools expect different separators. Linux utilities such as ip link and most packet captures write colons. Windows network panels and many Windows APIs accept hyphens. Configuration files, code constants, and database seed scripts usually prefer the plain hexadecimal form because there is no separator to escape or quote. Uppercase is the conventional IEEE render and tends to look identical across operating systems; lowercase is common in JSON fixtures and in many configuration languages.
Matching the format the consumer expects is more than cosmetic. Some parsers reject a colon-delimited string when a plain hex value is required, and some hash-based deduplication keys treat colons as separators while others treat them as part of the string. If your test reads MAC addresses back from a fixture and compares them to live output, pick the same format on both sides and stick with it.
Collision risks and registry hygiene
Randomness is not the same as uniqueness. The 46 free bits per address give an enormous space, but two independent draws can still collide by chance. Beyond chance, an operator who copies a generated address into a VM and forgets to track it can collide with a later fixture created from the same source. For local tests and short-lived labs the risk is academic. For any environment that survives long enough to receive several generations of fixtures, keep a small registry of the values you have already assigned and refuse duplicates before reusing a line.
Other risks to keep in mind: pasting a generated value into a production adapter changes that adapter's link-layer identity and can disrupt connectivity, violate organizational policy, or trip intrusion detection. The generator only emits text; it never modifies an interface, scans a network, or looks up vendors. If your task genuinely requires a globally unique assignment for hardware manufacture or vendor identification, follow the appropriate IEEE registration process rather than relying on a local bit pattern.
For a deeper look, see How to See Keyboard Shortcuts in Word on Windows or Mac.
For a deeper look, see How to Get a Directory Tree in Mac Terminal.