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.
Length presets
Advanced options
Only applied when the prefix is not blank; duplicate separators are avoided.
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
API Key Examples
These examples are deliberately synthetic. They are not known live keys and do not authenticate with a real service.
How to Use the API Key Generator
- 1Choose an API key formatSelect alphanumeric, hexadecimal, Base64 URL-safe, UUID-style, or custom.
- 2Select key lengthPick the required random key length when the selected format supports it.
- 3Configure optionsSet casing or custom character groups where available.
- 4Add a prefixOptionally add a prefix and separator for labelled test keys.
- 5Select quantityChoose the number of keys required.
- 6Generate keysClick Generate API Keys.
- 7Copy outputCopy the generated output.
