MAC Address Formats Explained: Colon, Hyphen, Dot

Try the MAC Generator

Open a terminal on three different machines and ask each one for its MAC address. Linux hands you 00:1a:2b:3c:4d:5e. Windows shows 00-1A-2B-3C-4D-5E. A Cisco switch prints 001a.2b3c.4d5e. Three different-looking strings — and yet they are the exact same address.

MAC address formatting trips up a lot of people because the separators imply there is something different about the value. There isn't. A MAC address is a 48-bit number, and every format below is just a different way of grouping and punctuating those 48 bits. This guide breaks down each notation, shows where you will run into it, and explains how to convert one into another.


What a MAC Address Actually Is

Before the formats make sense, it helps to remember what is underneath them. A MAC (Media Access Control) address is 48 bits — six bytes, or twelve hexadecimal digits. Those twelve hex digits never change between formats. What changes is:

  • How the digits are grouped (pairs of two, or groups of four)
  • Which separator character sits between the groups (:, -, ., or nothing)
  • Whether the letters A–F are upper or lower case

So 00:1A:2B:3C:4D:5E and 001a2b3c4d5e carry identical information. If you feed either one into the MAC address lookup tool, you get the same vendor back, because the underlying bytes are the same.

The first three bytes (00:1A:2B) are the OUI — the Organizationally Unique Identifier assigned to a hardware vendor by the IEEE. The last three bytes (3C:4D:5E) identify the specific network interface. That split is the same regardless of which notation you write the address in.


The Four Common MAC Address Formats

1. Colon-Separated (Unix / IEEE Style)

00:1A:2B:3C:4D:5E

Six pairs of hex digits separated by colons. This is the most common notation in documentation and the default on Linux and macOS. Run ip link or ifconfig on a Unix-like system and you will see colons. The IEEE itself uses this style in most of its standards, which is why people often call it the "canonical" format.

You will see it in: Linux (ip, ifconfig), macOS, most RFCs and tutorials, tcpdump and Wireshark output.

2. Hyphen-Separated (Windows Style)

00-1A-2B-3C-4D-5E

Identical grouping to the colon format, but with hyphens. This is what Windows shows when you run ipconfig /all or getmac, and it is the format the Windows registry expects when you set a MAC manually.

You will see it in: Windows ipconfig, getmac, Device Manager, the registry, and many Microsoft docs.

3. Cisco Dot Notation

001A.2B3C.4D5E

Cisco groups the twelve hex digits into three groups of four instead of six groups of two, separated by dots. This is standard across Cisco IOS and a lot of other enterprise networking gear. It looks unusual at first, but it is the same 48 bits — just chunked differently.

You will see it in: Cisco IOS (show mac address-table, show interfaces), many switches and routers, some firewall platforms.

4. No Separator (Plain Hex)

001A2B3C4D5E

Twelve hex digits, no punctuation at all. This is the most compact form and the friendliest for APIs, databases, and internal systems because there are no separator characters to escape, store, or normalize. Many backends store MACs this way and add separators only for display.

You will see it in: REST APIs, database columns, log files, CSV exports, embedded systems.


Side-by-Side Comparison

Format Example Grouping Separator Primary home
Colon 00:1A:2B:3C:4D:5E 6 × 2 : Linux, macOS, docs
Hyphen 00-1A-2B-3C-4D-5E 6 × 2 - Windows
Cisco dot 001A.2B3C.4D5E 3 × 4 . Cisco IOS
Plain 001A2B3C4D5E none none APIs, databases

Every row above is the same address. Choosing a format is a presentation decision, not a data decision.


Upper Case vs Lower Case

Hexadecimal digits above 9 use the letters A through F, and MAC addresses can be written with those letters in either case:

  • Upper case: 00:1A:2B:3C:4D:5E
  • Lower case: 00:1a:2b:3c:4d:5e

Case carries no meaning — 2B and 2b are the same byte. Conventions vary: Linux tools tend to print lower case, Windows prints upper case, and Cisco prints lower case. When you compare two addresses programmatically, normalize the case first (usually to lower) so a case mismatch does not produce a false negative. The random MAC generator lets you pick upper or lower case so generated values match whatever system you are feeding.


How to Convert Between Formats

Converting is mechanical: strip the existing separators down to the bare twelve hex digits, then re-group and re-insert whatever separator you want.

The Universal First Step: Normalize

Remove everything that is not a hex digit:

function normalize(mac) {
  return mac.replace(/[^0-9a-fA-F]/g, '').toLowerCase();
}
normalize('00-1A-2B-3C-4D-5E'); // "001a2b3c4d5e"

Once you have the twelve raw digits, every format is one step away.

To Colon or Hyphen (groups of two)

function group2(hex, sep) {
  return hex.match(/.{2}/g).join(sep);
}
const hex = normalize('001A.2B3C.4D5E'); // "001a2b3c4d5e"
group2(hex, ':'); // "00:1a:2b:3c:4d:5e"
group2(hex, '-'); // "00-1a-2b-3c-4d-5e"

To Cisco Dot (groups of four)

function ciscoDot(hex) {
  return hex.match(/.{4}/g).join('.');
}
ciscoDot('001a2b3c4d5e'); // "001a.2b3c.4d5e"

In Python

def to_colon(mac):
    hexed = ''.join(c for c in mac if c in '0123456789abcdefABCDEF').lower()
    return ':'.join(hexed[i:i+2] for i in range(0, 12, 2))

to_colon('001A.2B3C.4D5E')  # "00:1a:2b:3c:4d:5e"

Without Writing Code

If you just need one address in a different notation, paste it into the MAC address lookup tool. It accepts all four input formats, normalizes the value, and shows you every notation side by side — handy when you are copying a MAC from a switch into a ticket or config file. And if you need brand-new addresses in a specific format, the random MAC generator outputs colon, hyphen, Cisco dot, or plain hex directly.


Which Format Should You Use?

Match the destination, not personal preference:

  • Pasting into a Linux or macOS config? Use colons.
  • Setting a MAC in Windows or a Microsoft tool? Use hyphens.
  • Configuring a Cisco switch or router? Use dot notation.
  • Storing in a database or sending through an API? Use plain hex and add separators only when you display the value.

A good rule for software: store one canonical form (lower-case plain hex is a popular choice) and format for display at the edges. That keeps comparisons reliable and avoids the classic bug where the same MAC fails to match itself because one copy has colons and the other has hyphens.


FAQ

Are colon and hyphen MAC addresses the same?

Yes. 00:1A:2B:3C:4D:5E and 00-1A-2B-3C-4D-5E represent the identical 48-bit address. Only the separator differs — colons are conventional on Linux and macOS, hyphens on Windows. The underlying bytes, the vendor OUI, and the device portion are exactly the same.

Why does Cisco use dots in MAC addresses?

Cisco IOS groups the twelve hex digits into three groups of four (001a.2b3c.4d5e) rather than six groups of two. It is purely a display convention chosen by Cisco; the value is the same 48-bit address you would write with colons. Most Cisco command output and configuration uses this format.

Does upper case or lower case matter in a MAC address?

No. Hexadecimal letters A–F are case-insensitive, so 2B and 2b are the same byte. Different tools default to different cases, but the address does not change. When comparing addresses in code, normalize the case first so a cosmetic difference does not cause a mismatch.

How do I convert a MAC address from one format to another?

Strip all separators to get the twelve bare hex digits, then re-group them: pairs of two for colon or hyphen notation, groups of four for Cisco dot notation, or leave them joined for plain hex. You can do this in a couple of lines of code, or paste the address into the MAC address lookup tool to see every format at once.

What is the best MAC address format to store in a database?

Plain hex with no separators (for example 001a2b3c4d5e), normalized to lower case, is the most robust choice. It avoids separator-escaping issues, keeps comparisons consistent, and lets you add :, -, or . only when displaying the value to a user.

Do all four formats work everywhere?

No — each system expects its own notation. A Cisco switch will not accept colon-separated input in places that expect dot notation, and some APIs reject anything but plain hex. Always format the address to match the specific tool or platform you are giving it to. The random MAC generator can output any of the four formats so you do not have to convert by hand.

Generate Random MAC Addresses

Bulk generation up to 10,000 addresses. Multiple formats, vendor prefixes, unicast/multicast.

Open MAC Generator