MAC address generator

Generate MAC addresses with a prefix, casing, and separator

All computation runs locally in your browser

Last updated: February 8, 2026
Frank Zhao - Creator
CreatorFrank Zhao
64:16:7F:93:D1:A4

Introduction / overview

The MAC Address Generator creates random MAC addresses in the classic 6-byte format. You can lock in a vendor-style prefix (first bytes), choose a separator, and switch between uppercase and lowercase.

What it solves

Quickly generate valid-looking MAC addresses for lab devices, test data, configs, and documentation.

Why it’s reliable

Random bytes are generated locally in your browser using Web Crypto, and the output is formatted consistently.

If you also need to identify a manufacturer from an existing MAC, try our MAC address lookup tool.

How to use (quick start)

  1. 1
    Set Quantity (how many MAC addresses you want).
  2. 2
    Optionally enter a MAC prefix (partial prefixes are allowed).
  3. 3
    Choose Uppercase/Lowercase and your preferred separator.
  4. 4
    Press Refresh to generate a new set, then Copy to paste anywhere.

Worked example (with a prefix)

Suppose your prefix is 64:16:7F\texttt{64:16:7F} and the tool draws three random bytesBE, 75, EA\texttt{BE},\ \texttt{75},\ \texttt{EA}.

MAC\text{MAC}==64:16:7F\texttt{64:16:7F}\oplusBE:75:EA\texttt{BE:75:EA}==64:16:7F:BE:75:EA\texttt{64:16:7F:BE:75:EA}

That final string is what you copy into configs, DHCP reservations, test fixtures, or documentation.

How to read the result

A MAC address is six hexadecimal bytes. With the separator set to :\texttt{:}, you will see 6 groups of 2 hex characters. If you choose “None”, the 12 hex characters are shown without separators.

Real-world examples / use cases

Virtual machines and lab NICs

You need unique MACs for a small VM cluster to avoid collisions.

Inputs: Quantity=10,Prefix=(empty),Separator=:,Case=upperQuantity = 10, Prefix = (empty), Separator = : , Case = upper

Result: 10 random MACs like A1:2B:3C:4D:5E:6F10\ \text{random MACs like }\texttt{A1:2B:3C:4D:5E:6F}

Paste them into your VM/network configuration and regenerate anytime.

Vendor-like demo data

You want test data that looks like it belongs to a specific vendor prefix.

Inputs: Prefix =64:16:7F, Quantity =3\text{Prefix }=\texttt{64:16:7F},\ \text{Quantity }=3

Result: Each output starts with 64:16:7F\text{Each output starts with }\texttt{64:16:7F}

Use the generated list in fixtures or sample exports, then verify OUIs with MAC address lookup.

Documentation and runbooks

You’re writing docs and need realistic examples that are consistent in style.

Inputs: Separator =-, Case =lower\text{Separator }=\texttt{-},\ \text{Case }=\text{lower}

Result: Example aa-bb-cc-11-22-33\text{Example }\texttt{aa-bb-cc-11-22-33}

Keep a consistent format across guides so readers can copy/paste safely.

Working with IP-related configs too? You might also like our IPv4 address converter.

Common scenarios / when to use

Testing DHCP reservations

Generate stable-looking MACs for config templates and examples.

Mocking network inventory

Create dummy device entries without leaking real hardware identifiers.

CI fixtures for parsers

Feed many valid-looking addresses into your unit tests.

Consistent formatting

Match your preferred separator and casing in documentation.

Prefix-based simulations

Lock a prefix to simulate a vendor or a lab segment.

Quick copy/paste workflows

Generate, refresh, and copy without leaving the page.

When it may not be appropriate: if you need a MAC tied to a specific physical device, use the device’s real hardware address. Random MACs are great for testing and examples, not for identifying real hardware.

Tips & best practices

Practical tips

  • If you need a specific style, decide separator + casing first, then keep it consistent across your project.
  • Use a prefix when you want addresses to “look like” a vendor range, but don’t assume it reflects a real device.
  • If your system rejects input, try switching the separator to match what it expects (colon vs dash vs none).
  • Generate a larger batch once, then store the list with your test data to keep runs reproducible.

Calculation method / format explanation

Conceptually, a MAC address is six bytes:

MAC=b1sb2sb3sb4sb5sb6\text{MAC} = b_1\,s\,b_2\,s\,b_3\,s\,b_4\,s\,b_5\,s\,b_6

Each bib_i is a two-digit hexadecimal byte (from 0000 to FFFF), and ss is your chosen separator (like :\texttt{:}).

If you provide a prefix of kk bytes, the generator keeps those bytes and fills the remaining6k6-k bytes randomly.

MAC\text{MAC}==(prefix bytes)(\text{prefix bytes})  \ \Vert\ (random bytes)(\text{random bytes}), where #random bytes=6k,\ \text{where}\ \#\text{random bytes}=6-k

Finally, the tool formats the hex string using your separator and applies the casing setting (uppercase or lowercase).

Related concepts / background

OUI / vendor prefix

The first 3 bytes of many MAC addresses are commonly called an OUI (Organizationally Unique Identifier). In practice, that’s why a prefix like 64:16:7F\texttt{64:16:7F} can make your test data look “vendor-like”.

Want to check what a prefix maps to? Use MAC address lookup to see vendor info.

Frequently asked questions (FAQ)

Is the prefix required?

No. Leave it blank to generate a fully random 6-byte MAC address.

Why does the tool accept “partial” prefixes?

It’s convenient when you only know the first byte(s). If you type AA:BB\texttt{AA:BB}, the generator will fill the remaining bytes.

Will these MAC addresses work on real hardware?

They are formatted correctly, but whether a device/OS allows setting them depends on your platform and policies.

Can I share a link with my settings?

Yes. Use Share and enable “share calculator with results” to include your inputs in the URL.

Does “None” separator change the value?

No—only the formatting changes. The same 6 bytes can be displayed with separators or as 12 hex characters.

Limitations / disclaimers

This generator is designed for testing, examples, and local workflows. It does not validate uniqueness on your network, and it does not guarantee that a given prefix is assigned to a particular organization.

External references / sources

  • IEEE 802 standards and MAC addressing overview (general background).
  • Web Crypto API: crypto.getRandomValues (random byte generation concept).