All Tools
Categories
XML Tools 64 Email Marketing Tools 55 Import-Export Tools 50 JSON Tools 45 Number Tools 44 Text Tools 13 Shipping Freight Tools 5 Calculator 4
About Contact Privacy

Random Hex Numbers Generator

Generate random hex strings of any digit length with optional prefixes (#, 0x), case toggle, color-preview swatches and bulk conversion. Export as CSV, JSON or plain text. Includes decimal and binary equivalents.

Mode & Length
Notation
First Few Values
Export

About Random Hex Numbers Generator

Hex is one of those things that quietly shows up everywhere once you start noticing it — colour codes, MAC addresses, hash output, byte dumps, register values, URL fragments. Generating a usable hex string by hand is straightforward but tedious, and the tools that produce them on demand tend to be either too narrow (colour-pickers only) or too generic (random string generators that include the hex set but do not know to format it nicely).

Random Hex Numbers Generator produces hex strings of any digit length with optional prefixes (#, 0x), case toggle, and presets for the common uses — colour codes with a live preview, MAC addresses with the standard colon separator, canonical UUIDs, and cryptographic hash digests at standard lengths. Set the count, the length, the case, the prefix style and copy the result or download it.

Underneath the buttons is the small amount of information the system actually requires — what hex represents, which notation applies where, what uniform means in hex — plus practical guidance on which preset fits which purpose. Everything runs in your browser; nothing is uploaded.

Features

  • Any digit length, any count: One digit to 128 digits, one value to 10,000 values, with presets for common hash widths.
  • Color mode with live preview: Each 6-character hex rendered as a coloured swatch beside the value, so you can spot clashing palettes instantly.
  • UUID preset: Canonical 32-character hex strings in the 8-4-4-4-12 form expected by RFC 4122.
  • MAC preset: 6 pairs of hex digits with colon separators (08:00:27:6E:1B:9C).
  • Optional seed: Reproducible sequences for testing and debugging — same seed, same output every time.
  • Uppercase or lowercase toggle: Match the convention of whatever code consumes the output.
  • Optional prefix: # for CSS colour codes, 0x for C literals, plain hex for everything else.
  • Decimal and binary equivalents column: Show the integer value alongside the hex string for sanity-checking the range.
  • Three export formats: CSV (hex only), JSON array and a plain text list with index, hex, decimal and binary.
  • Copy or download: Take what you generate without leaving the browser, with nothing uploaded to any server.

How to Use

  1. Pick a mode. Random hex for general use, color for swatch preview, MAC for network addresses, UUID for canonical 32-character identifiers.
  2. Set the digit length. Use a preset (8, 16, 32, 40, 64) or set a custom length from 1 to 128.
  3. Set the count. How many values to generate.
  4. Choose notation. Plain hex, # prefix (CSS colour), 0x prefix (C literals).
  5. Pick a case. Uppercase for C-style outputs, lowercase for URLs and JSON.
  6. Set a seed if reproducibility matters. Empty for fresh on every run; a non-empty value pins the output.
  7. Copy or download the result. CSV for spreadsheets, JSON for code, plain text for documentation.

Examples

Example 1 — Hash digest display. Generate 50 64-character hex strings — the SHA-256 width. The output looks like a list of hash digests ready to paste into a verification log.

Example 2 — Mock colour palette. Switch to color mode and generate 12 6-character hex values with the # prefix. The colour swatches give a quick visual sanity check on the palette before using it.

Example 3 — Bulk MAC address generation. Switch to MAC mode and generate 20 MAC addresses. Each line reads as 08:00:27:6E:1B:9C — ready to feed into a network configuration tool for testing.

Example 4 — UUID fixtures. Switch to UUID mode for canonical 32-character strings in the dashed form. The output matches the format expected by databases and UUID parsing libraries, even though the values themselves are not v4-compliant.

Example 5 — Reversible debug aid. Pin a failing test by switching to a deterministic seed and replaying. The exact same hex strings appear in the exact same order, which makes hash-collision or colour-palette bugs trivial to reproduce.

Benefits

  • Stop hand-rolling hex strings: Get hundreds of hex values in one click, in the format and notation you actually need.
  • Reproduce any failure: A seed pins the output for debugging — re-run with the same seed and the same values appear in the same order.
  • Match any consumer: # for CSS, 0x for C, plain hex for everything else, and presets for the common special forms.
  • Stay in any case: Uppercase for C-style outputs, lowercase for URLs and JSON.
  • Export the shape you need: CSV for spreadsheets, JSON for code, plain text for documentation.
  • Free and private: No account, no watermark, nothing uploaded.

Frequently Asked Questions

What is a random hex string?
It is a sequence of hexadecimal digits — 0 through 9 and A through F — of any chosen length, where every character has an independent probability of being anything in the 16-character set. Hex is the dominant base in computing because each digit maps cleanly to four binary bits, which makes it the most readable shorthand for binary values, byte streams and colour codes.
Where is hex used most often?
Hex appears in colour codes (#FF8800), in MAC addresses (08:00:27:6E:1B:9C), in UUID fragments, in cryptographic hashes (SHA-256 produces 64-character hex), and in any memory dump or byte-level log. It is also the friendly form of binary for any human-readable debug output.
How are colour codes generated?
Each colour code is a 6-character hex string prefixed with a hash — so #RRGGBB where each pair of characters is the red, green and blue channel of the colour. A uniform random generator produces vivid, often garish colours. The colour-preset mode lets you restrict each pair to a range that biases the output toward usable palettes.
Can I generate realistic-looking colour palettes?
Yes — switch to palette mode and the generator restricts each channel to a narrower range than 0 to 255, which produces colours that are visually balanced rather than random. The result is a list of colours that would not look out of place in a brand style guide or a design system.
Can I reproduce a specific list?
Yes — supply a seed in the seed field and the generator will produce the same sequence every run. This is invaluable for testing design systems, hashing routines, or any code path that depends on a known hex input. The seed is preserved beneath the output so you can return to a specific run later.
What is the difference between upper and lowercase hex?
The two notations are equivalent — #ABCDEF and #abcdef refer to the same colour, and AA22FF and aa22ff encode the same bytes. Uppercase is the convention in many C APIs (X11 macros, OpenSSL output) and in some byte-dump tools. Lowercase is more common in URLs, in JSON output and in most modern programming languages. The generator lets you toggle case or output both.
How long should cryptographic hashes be?
MD5 produces 32 hex characters, SHA-1 produces 40, SHA-256 produces 64, and SHA-512 produces 128. Random hex strings at those widths are useful for sanity-checking hash output, signature code and fingerprint displays. Note that random strings do not actually compute hashes — they look like hashes, which is what you want when testing display logic but not cryptography itself.
Can I generate MAC addresses?
Yes — switch to MAC mode and the generator will produce 6 pairs of hex digits separated by colons (08:00:27:6E:1B:9C), which is the standard display form. Optionally prefix the well-known OUI of a particular manufacturer — useful for testing network configuration tools that key off the OUI.
Can I generate UUIDs?
Yes — switch to UUID mode and the generator will produce canonical 32-character hex strings in the 8-4-4-4-12 form expected by RFC 4122, plus dash separators where appropriate. The output is form-correct but not strictly random in the cryptographic sense — use dedicated UUID tooling for production identifiers.
Is the output cryptographically secure?
No. The generator uses a fast pseudo-random algorithm that produces uniform distribution and good statistical properties, but is not designed to resist an attacker observing the output. For keys, tokens, UUIDs and secrets, use dedicated cryptography tooling.
Is anything I enter stored?
No. Every value is produced in your browser and nothing is uploaded, saved or logged. Copy or download what you generate before closing the tab, because it will not be there when you come back.