Secure browser-based developer tool

API Key Generator

Generate synthetic random key material locally for tests, fixtures, examples, and systems where you will register and manage the key yourself. Nothing is stored or transmitted.

Generated API keys will appear here after you press Generate.

API key settings

Use a clearly synthetic prefix such as dgh_test, demo, or sample. Prefix and separator do not reduce the random portion length.

Structure preview••••••••••••••••

Every enabled character group is represented in each generated alphanumeric key.

Do not imitate a real provider's production-key format in public examples unless it is clearly marked as synthetic.

Length presets

Advanced options

Only applied when the prefix is not blank; duplicate separators are avoided.

Alphanumeric groups

Ambiguous characters are I l 1 O 0 o. Exclusions apply after the alphabet is built.

What Is an API Key?

An API key is a string used by software systems to identify an application, project, integration, or caller. API keys are common in request headers, environment variables, SDK configuration, and server-to-server integrations. Generated keys from this page are synthetic values; they are not registered with any API and do not grant access by themselves.

How API Keys Work

A production API key only becomes meaningful when an API provider stores it, associates it with permissions or an account, and checks it during requests. A random string can be good key material, but authorization, revocation, rotation, rate limits, and audit logging must be handled by the system that accepts the key.

API Key Formats

API keys can be alphanumeric strings, hexadecimal strings, URL-safe Base64 strings, UUID v4 identifiers, or values drawn from a custom alphabet. Neutral prefixes such as dgh_test_, demo_, or sample_ can make synthetic data easier to scan without imitating a real provider.

Secure Random API Key Generation

This generator creates key material in the browser using cryptographically secure randomness. It does not make a network request to generate keys, does not place generated keys in metadata or structured data, and does not store them beyond the current page session.

API Keys vs Access Tokens

API keys often identify an application or integration. Access tokens more commonly represent authorization grants, scopes, expiry, or signed sessions. Some platforms use these terms differently, so always follow the security model of the API you are integrating with.

API Keys vs Passwords

API keys and passwords are both secrets, but API keys are usually issued for applications or integrations rather than human sign-in. Use the Random Password Generator for human account passwords; use this tool for synthetic key material that your own system will provision and manage.

Test Keys vs Production Keys

Generated keys are useful for development, testing, integrations, mock data, and examples. A production key should be created or registered in your own system, stored securely, monitored, and revocable. Do not commit production keys to source control or paste them into public issue trackers, logs, or documentation.

How to Store API Keys Securely

Use a secrets manager, encrypted configuration store, deployment secret, or secure environment-variable system for production keys. Keep permissions narrow, separate test and production credentials, rotate keys regularly, and remove old keys when integrations are retired.

How Much Entropy Should an API Key Have?

Entropy measures the size of the random search space, so the alphabet matters as much as character count. Around 64 bits may be adequate only for limited, low-risk internal uses; around 128 bits is a strong general-purpose baseline; and 192 to 256 bits can suit higher-value or long-lived secrets when the system supports them. The right choice also depends on exposure risk, rate limits, permissions, rotation, and revocation.

Common Uses for Generated API Keys

Development fixtures
Create key-shaped values for local config, seed data, and demos.
API examples
Add realistic-looking synthetic keys to request examples and documentation.
Integration testing
Exercise form validation, masking, copy flows, and backend parsing.
Sample data
Populate mock records without exposing live credentials.

API Key Examples

These examples are deliberately synthetic. They are not known live keys and do not authenticate with a real service.

Alphanumeric key
dgh_7Mvx2PKs9Qe4ZaR1bTn8LcY6
Hex key
dgh_f47a29c8bb03e6d1a9c52f0048ea173b
URL-safe key
dgh_aB7_qx92LmN4-RT6zP0yVk31
Prefixed test key
dgh_test_D4vR8mQ2pL9sN6xT
UUID-style key
7f1c2a10-4b6d-4a89-9c23-2e6f902ad471

How to Use the API Key Generator

  1. 1
    Choose an API key format
    Select alphanumeric, hexadecimal, Base64 URL-safe, UUID-style, or custom.
  2. 2
    Select key length
    Pick the required random key length when the selected format supports it.
  3. 3
    Configure options
    Set casing or custom character groups where available.
  4. 4
    Add a prefix
    Optionally add a prefix and separator for labelled test keys.
  5. 5
    Select quantity
    Choose the number of keys required.
  6. 6
    Generate keys
    Click Generate API Keys.
  7. 7
    Copy output
    Copy the generated output.

Frequently Asked Questions

What is an API key?
An API key is a string used by software to identify an application, project, integration, or caller when making API requests.
How does the API key generator work?
It builds an effective character alphabet from your settings, selects characters with unbiased browser cryptographic randomness, and assembles the optional prefix locally.
Are generated API keys stored or transmitted?
No. Keys remain in the current browser page and are not sent to a server, saved in browser storage, added to URLs, or included in analytics events.
Does this generator use secure randomness?
Yes. Random key material uses the Web Crypto API with rejection sampling for unbiased character selection. It fails instead of using an insecure fallback when Web Crypto is unavailable.
Can I use these keys in production?
You can use generated values as key material only if your own production system registers, stores, rotates, and revokes them correctly. Store production keys in a secrets manager or secure environment-variable system.
What API key length should I choose?
Choose length based on the alphabet and required entropy, not character count alone. For example, 32 hexadecimal characters provide 128 random bits, while 32 URL-safe characters provide about 192 bits.
How many bits of entropy should an API key have?
Around 128 random bits is a strong general-purpose baseline. Higher-value or long-lived secrets may use 192 to 256 bits when supported, while lower-risk internal systems may accept less after a proper risk review.
What is a URL-safe key?
A URL-safe key uses A-Z, a-z, 0-9, hyphen, and underscore. It omits plus, slash, and equals padding, making it easier to transport in common text contexts.
What is the difference between an API key and an access token?
An API key often identifies an application or integration, while an access token usually represents delegated authorization, scopes, expiry, or a signed session.
What is the difference between an API key and a password?
API keys generally identify software integrations, while passwords authenticate people. Both require secure storage, but their provisioning, permissions, rotation, and recovery workflows differ.
Should API keys contain symbols?
Symbols are not required if the key has enough entropy. A sufficiently long alphanumeric, hexadecimal, or URL-safe key can be strong and easier for receiving systems to handle.
What does an API key prefix do?
A prefix labels the key type or environment for people and scanners. It adds no random entropy and does not register or authorize the key.
How should API keys be stored?
Store production API keys in a secrets manager, encrypted configuration store, or secure environment-variable system. Do not commit them to source control.
How often should API keys be rotated?
Rotate API keys on a schedule appropriate to the risk of the system, and immediately after suspected exposure or staff and vendor access changes.
Why does a generated key not automatically grant API access?
It is only random key material. Your application must register, store, validate, rotate, and revoke the key before it can function as a real credential.