Developer Lists

MAC address formatter

Transformed in your browser · nothing is uploaded

Local · exactly twelve hex digits, or refused

Reformats MAC addresses one per line into whatever separator style you need. Type a colon, a hyphen, or any other character into the separator box and it goes between the six pairs. Two inputs are special: a full stop produces Cisco's three groups of four digits, and an empty box produces the bare twelve hex digits with nothing between them.

How to use the mac address formatter

1 Paste your text into the first box.
2 The result appears immediately.
3 Copy the result, or save it as a text file.

The competing styles exist because vendors chose differently and none of them gave way. Linux and most tooling write colons, Windows and IEEE documents write hyphens, Cisco writes three dotted groups of four, and bare hex turns up in configuration files and logs. Every one of them is the same forty-eight bits. Only the hex digits are read on input, so paste any style in and choose the style you want out.

Reading only the digits has one consequence to watch for before you paste a log line in. Every non-hex character on the line is discarded, which means a device name or a comment sharing the line contributes its own a-to-f letters to the count and the line is then refused. Feed it addresses on lines of their own.

Anything that is not exactly twelve hex digits is refused rather than padded, and the line comes back saying so. A MAC address with eleven or thirteen digits is a typo, and guessing which digit is missing would turn a visible error into a silent wrong answer. That also means a sixteen-digit EUI-64 identifier is refused here; it is a different, longer identifier rather than a badly formatted MAC.

An empty separator box is a choice rather than an oversight, and it produces the run-together bare hex form with nothing between the pairs. Clearing the box is all it takes; there is no need to format with a separator and then strip it out again.

The first half of the address is not arbitrary. IEEE assigns organisations a 24-bit Organizationally Unique Identifier, and an address built from one carries it in the first three octets, which is how a lookup names the manufacturer. Smaller blocks complicate that: IEEE also sells medium and small assignments, where the first 24 bits belong to the IEEE Registration Authority rather than the assignee and you have to look at the first 28 or 36 bits to find the owner. Two bits in the very first octet carry meaning of their own. IEEE calls the least significant bit of the first octet the M bit, which marks a group or multicast address, and the next one along the X bit, which marks a locally administered address. Both are zero in a real OUI, which is why a randomised privacy address from a phone always has that second bit set and never matches a manufacturer.

What people use it for

  • Converting a colon-separated address into the hyphen form a Windows tool expects
  • Reformatting a list of addresses into dotted quads for a Cisco configuration
  • Normalising addresses collected from several devices before comparing them
  • Catching a typo in an address that is one hex digit short
  • Checking whether an address is a real manufacturer one or a randomised privacy address

Questions

Vendor convention. Linux and tooling use colons, Windows and IEEE documents use hyphens, Cisco uses dotted groups of four, and bare hex appears in logs.

IEEE, guidelines for use of EUI, OUI and CID
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding