API Key Format Generator
Local ProcessingGenerate realistic mock API key strings with custom service prefixes (e.g. sk_live_, pk_test_) for testing and mocking.
How It Works & Processing Standards
Generate realistic mock API key strings with custom service prefixes (e.g. sk_live_, pk_test_) for testing and mocking.
Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.
Current Limits
- Maximum input length: 2,000,000 characters
Set a prefix and random byte count to get a "prefix_randomstring" key. The random part is Web Crypto randomness in Base64URL, so it drops straight into URLs and headers.
These are random strings, not keys for any real external service.
What You Can Do
- Prefix
- Marks the key type, such as sk, pk or api (letters, digits, _ and -, up to 16).
- Random body
- 8–64 bytes of secure randomness in Base64URL.
How to Use API Key Format Generator
- 1Set the prefixThe default is sk.
- 2Set the lengthChoose the random byte count (default 24).
- 3Generate and copyCopy the key.
Examples
Common Use Cases
- Designing the API key format your service issues to users
- Fake keys for docs and test code
Frequently Asked Questions (FAQ)
Why add a prefix?
It shows at a glance what the key is for (secret or public), and makes accidentally committed keys easier for secret scanners to find.
