Preparing your generator page
We are loading content and tools so everything is ready to use.
We are loading content and tools so everything is ready to use.
Generate mock API keys for local development, QA fixtures, and documentation. Set a prefix (default test_), a body length from 8 to 128 characters, and a batch of 1 to 50. Choose hex, base62, or base64url, optionally group the body with hyphens, then copy the lines. These strings do not authenticate to any live API.
For record ids, use the UUID Generator. For login passwords, use the Random Password Generator. More helpers are in Utility tools.
Last updated: October 8, 2026 · Published: 2026-04-09 · Updated: 2026-10-08
Sample output
test_m4LfmAHNtugwUcRMjWw5t9eEKIDF20nK
Generated keys
These are mock/random keys for development and testing. Do not treat generated samples as production secret-management infrastructure.
An API key is a secret string a client sends so a server can decide whether the call is allowed. Teams often put it in an Authorization: Bearer header, or in a vendor-specific header. A generator on this page only builds the string: a prefix you choose, plus random characters from hex, a 62-character alphabet, or base64url.
That is a mock credential. No provider receives it, nothing is registered, and the string will fail against a real API. Use it in .env files, test data, and docs while the real issuer — the API dashboard or a secrets manager — is what creates live keys.
Generation stays in your browser. When crypto.getRandomValues is available, each character index comes from that. The result is appropriate for fixtures. It is not a substitute for the system that will later check the key.
Four steps from a prefix to a newline-separated list.
Leave test_ or switch to mock_ or dev_. The prefix is copied as typed and does not count toward key length.
Body length is 8–128 characters (default 32). Hex, alphanumeric, base62, and base64url cover the shapes most API docs show.
Quantity is 1–50 (default 3). Each line is an independent string. The sample above the list is only a preview.
Copy all keys into a local .env, a test factory, or a docs sample. Do not commit the batch or ship it in frontend code.
Limits and defaults match the generator on this page.
| Setting | This generator |
|---|---|
| Purpose | Mock API keys for dev, QA, and docs |
| Prefix | Any string you type; default test_ |
| Body length | 8–128 characters (default 32), excluding prefix and hyphens |
| Quantity | 1–50 lines per click (default 3) |
| Default alphabet | Base62 — same characters as alphanumeric |
| Grouping | Off by default; hyphen every 2–12 body characters |
| Random source | crypto.getRandomValues in the browser when available |
| Storage | None — stays in the page until refresh |
| Production use | No — not a secret manager and not a live credential |
What each field changes in the copied lines.
Leading text on every line. Default test_. It is not randomized and it is not included in the length count.
Count of random body characters. Default 32. The field clamps to that range. Hyphens, if enabled, are extra.
How many lines Generate writes. Default 3. Copy all joins them with newlines.
hex (16), alphanumeric (62), base62 (62, the default), or base64url (64). Alphanumeric and base62 allow the same characters.
Optional. Inserts a hyphen every 2–12 body characters (default 4) and strips a trailing hyphen. The prefix is not split.
The sample refreshes when settings change. Copy all copies only the generated list, after you click Generate.
Alphabet size decides how many bits each body character carries. The last column is a 32-character body, which is the default length. The prefix is not included.
| Charset | Characters | Size | Bits per character | Bits in 32 characters |
|---|---|---|---|---|
| Hex | 0–9, a–f | 16 | 4 | 128 |
| Alphanumeric | A–Z, a–z, 0–9 | 62 | ~5.95 | ~190 |
| Base62 (default) | 0–9, A–Z, a–z | 62 | ~5.95 | ~190 |
| Base64url | A–Z, a–z, 0–9, -, _ | 64 | 6 | 192 |
Alphanumeric and base62 are the same 62-character set written in a different order, so the strings look the same. Base64url on this page means “draw from that 64-character alphabet,” not “encode an existing payload in base64.” Hex is the right choice when the fixture should contain only 0–9 and a–f.
A prefix marks the string as a test credential before anyone reads the random half. test_ is the default. mock_ and dev_ work the same way. Avoid copying a vendor’s live prefix into screenshots or repositories: secret scanners look for those patterns even when the body was made up here.
Grouping is for humans reading a docs screenshot. It inserts a hyphen every N characters of the body only, then removes a hyphen at the end. A length of 32 grouped every 4 characters is eight chunks and seven hyphens, with the prefix still in front. Turn grouping off when the fixture must match a parser that rejects hyphens.
Placeholders for code that is not talking to production yet.
Fill API_KEY or SERVICE_TOKEN while the real issuer is not wired up. Keep the file gitignored.
Seed ten to fifty distinct values for list, rotate, and revoke screens.
Publish test_ or mock_ strings so readers can see the header shape without a live secret.
Paste a batch into an environment used only against localhost or a sandbox.
Check that your parser accepts the prefix, length, and alphabet you will document.
Show a credential-shaped string that is obviously fake and was never issued by a provider.
These names get mixed together in docs. Only one of them is what this page generates.
| API key | UUID / GUID | Password or JWT | |
|---|---|---|---|
| What it is | Opaque shared secret sent by a client | 128-bit identifier | Human login secret, or a signed token |
| Typical shape | prefix + 8–128 character body | 8-4-4-4-12 hex with hyphens | Password policy string, or header.payload.signature |
| Sent as | Authorization: Bearer, or a vendor header | Path, column, or log field — not a secret | Login form, or Authorization: Bearer for a real JWT |
| This Muxgen page | Yes — mock strings only | Use the UUID or GUID generator | Use the password generator; this page does not sign JWTs |
| Grants live API access | No | No | No |
The UUID Generator and GUID Generator are for identifiers. The SSH Key Generator is for shell and CI key pairs. The Regex Generator can assert the prefix and alphabet once you freeze a format.
Keep placeholders out of production paths and public git history.
A live key is created where it will be verified, then stored in a secrets manager or CI secret — not generated in a browser and pasted into production.
test_, mock_, and dev_ are safer prefixes than a vendor’s live prefix. Secret scanners flag familiar live prefixes even when the rest is random.
If a generated list lands in git, treat the fixture as public and replace it. History still contains the old lines.
Tutorials that put keys in ?api_key= teach a habit that leaks into access logs and Referer headers. Prefer a header in real designs.
If the server allows only hex, generate hex. Length here is the body, so include the prefix when you write the regex.
Login passwords and OpenSSH key pairs solve different problems. Do not reuse a mock API key as either one.
Short definitions for the words on this page.
A secret string a client sends to authenticate to an HTTP API. Possession of the string is what the server checks.
A random lookalike for tests and docs. It is not registered with a provider and does not authorize live traffic.
The HTTP scheme Authorization: Bearer followed by the credential. An API key is often presented that way.
Fixed leading text such as test_ that marks environment or key type. On this page it is not part of the random length.
The alphabet used for each random character: 16 for hex, 62 for alphanumeric and base62, 64 for base64url.
Digits plus uppercase and lowercase letters, and no + or /. The default alphabet on this generator.
The base62 alphabet plus hyphen and underscore. This page samples that alphabet; it does not base64-encode a payload.
A signed token in three dot-separated parts. This generator does not create JWTs.
A system that issues, stores, and rotates real credentials. This browser tool is not one.
Mock versus live keys, charsets, entropy, prefixes, grouping, privacy, and how this differs from UUIDs and JWTs.
Explore more tools in the directory.
128-bit ids for records and correlation — not API secrets.
GUID-formatted identifiers when a Microsoft-style id is required.
Human login passwords with policy-style character sets.
OpenSSH key-pair material for servers and CI, not HTTP bearer tokens.
Patterns to assert the shape of a mock key in tests.
Format API error bodies while you wire auth against fixtures.