Hex Token Pair Generator
Generates matching pairs of hex tokens for use as key-secret or client-credential pairs
- Key
- 0e6ce8c2902bb04fb2af01c1b2062c81
- Secret
- 90dd6649dfd2d0eba77af9e1a28969a093f43cee5f530a63f1ddae5f1a32e504
- Key
- da82338843165d53eba46836d2dfa5c1
- Secret
- 707f91bddf0296288c0a0f0b7e815492bbe92b0ba0b1d85a7a18449dd8c18b76
- Key
- 926e757741d64a732cf309eee4da5c1c
- Secret
- ccaf10e8b11ecc5e58659494f6d1f2d4aeaa857ce4846cdd117b247520212e82
- Key
- 1a75d26a369c4a322e218a85b56c074b
- Secret
- 34591b06741a120a2f71e42e9c4cc24545d2c2e9bdf9b2eb94a2110cf4f08ecd
- Key
- fae330a38453865f832c57dc82223450
- Secret
- d49fb0ad3313315d7193f67b070fb34613b6cfbc52467a8c8602f83bb5ffc26d
Generated 5 items
See 3 examples
- Example 1
Pair 1 Key: 0e6ce8c2902bb04fb2af01c1b2062c81 Secret: 90dd6649dfd2d0eba77af9e1a28969a093f43cee5f530a63f1ddae5f1a32e504 Pair 2 Key: da82338843165d53eba46836d2dfa5c1 Secret: 707f91bddf0296288c0a0f0b7e815492bbe92b0ba0b1d85a7a18449dd8c18b76 Pair 3 Key: 926e757741d64a732cf309eee4da5c1c Secret: ccaf10e8b11ecc5e58659494f6d1f2d4aeaa857ce4846cdd117b247520212e82 Pair 4 Key: 1a75d26a369c4a322e218a85b56c074b Secret: 34591b06741a120a2f71e42e9c4cc24545d2c2e9bdf9b2eb94a2110cf4f08ecd Pair 5 Key: fae330a38453865f832c57dc82223450 Secret: d49fb0ad3313315d7193f67b070fb34613b6cfbc52467a8c8602f83bb5ffc26d
- Example 2
Pair 1 Key: ac0e3954246766857f71470e640019db Secret: 9f9bc30e32625e7c2b5b2b6fa86d1e1abb4909fba8796af9b21200cc997a445f Pair 2 Key: 9f90092a6df01ff95cb1c05f8551603f Secret: 8fe08ef4af3f575cfbb8e0b071df2858e8b49f28e5a7c75dcf18bb2d9d3c8688 Pair 3 Key: 7f0f0973d89e33d359a5d3d75244c876 Secret: 523bceae44e065b466be5e21098a13b288c97d3f57a4c54e320687d71d92b103 Pair 4 Key: 277c33f32fd4b36ac0f73f9f7a9ccba4 Secret: 4c18aa475d228c5b3fbf4ec54571e3badf5d0a9f5975b63d07f666b324bb4290 Pair 5 Key: 01af6cf5cbefd2b20e12c5810f65f001 Secret: cf48c807ccdd731b86636e0c356664da7f82ae89244949fe48cc93b56da4e7cb
- Example 3
Pair 1 Key: 87acc6ba5b8f78d5ec54ffa73505a323 Secret: 6727a9c9367abb491e56d5d3912eb1cdfc362f9d4d4b7345af60d03280cfacc4 Pair 2 Key: dda848a665a2564536772d90d4f15984 Secret: 4494f2c6e3f70c9fde37b377f3496e1fbb111483b3abdab987c7e609f2fd047d Pair 3 Key: 4d5869e80d6ea534bc272fcc639b8069 Secret: 32e18eb5afa6bb46390c32efe77bfa71c8c2ee975b6139bd53c7dd57fe934e85 Pair 4 Key: 5824a9658f7cbbcce7d84d508268c47a Secret: dff02a6d2302b9e5cba8d3582dbd08a509242edc3913d167c5589e7b081c1f03 Pair 5 Key: e1e1297b033c6d1fecd78a2724fcf957 Secret: deb2b5228ccf96650fee56d811354058310e114f6b899fb3af062a1fcf8eb87f
About this generator
A hex token pair generator creates matched key-secret pairs as hex strings — the foundation of API authentication, OAuth client credentials, and webhook signing. The key acts as a public identifier (safe to log and transmit); the secret proves identity and stays private. Set the key to 16 bytes and the secret to 32 bytes and you get the most common credential format: a 32-char key and 64-char secret. Generate up to hundreds of pairs at once and paste them straight into your config files or environment variables. Most developers reach for this when provisioning test clients, seeding staging databases, or wiring up a local OAuth server without touching production infrastructure.
How to use
- Set the count field to the number of key-secret pairs you need to generate.
- Adjust key length (default 16 bytes) and secret length (default 32 bytes) to match your system's requirements.
- Click Generate to produce the batch of hex token pairs.
- Copy individual pairs or the full list, then paste keys and secrets into your config file, database seed script, or environment variables.
Use Cases
- •Provisioning 20 OAuth2 client_id / client_secret pairs for a multi-tenant staging environment
- •Seeding a mock OAuth server in a GitHub Actions CI pipeline with realistic credential fixtures
- •Populating HMAC_KEY and HMAC_SECRET environment variables in a local Docker Compose setup
- •Generating webhook signing key pairs to test payload verification logic in Jest or Supertest
- •Bulk-creating API gateway credentials in Postman environments before a load-testing run
Tips
- →Use a 16-byte key and 32-byte secret as defaults — these match common OAuth2 server expectations out of the box.
- →Generate 10-20 pairs at once when seeding a test database; you'll need more than you think for realistic fixture data.
- →If your system expects base64 instead of hex, convert with btoa(hexString) in JS or binascii.unhexlify + base64 in Python.
- →Prefix keys with a short identifier string (e.g. 'pk_live_' or 'app_') after generating — it makes credential type obvious at a glance.
- →Keep key and secret lengths consistent across your whole system; mixing lengths makes log parsing and debugging harder.
- →When testing webhook signing, use the same secret in both your sender and receiver config — regenerate a fresh pair for each test environment.
FAQ
how long should an api secret be in bytes
32 bytes (64 hex characters) is the practical minimum — that's 256 bits of entropy, sufficient against brute-force. Keys only need to be unique, not unpredictable, so 16 bytes is the standard. If your target system specifies a character length instead of bytes, divide by two to get the byte input value.
are these hex tokens safe to use in production
No. This generator runs in the browser using its cryptographic random source, but production secrets should be issued server-side. For real credentials, use crypto.randomBytes() in Node.js, secrets.token_hex() in Python, or openssl rand on the command line. Treat this tool as a dev and prototyping shortcut only.
what's the difference between the key length and secret length settings
The key is a public identifier — it only needs to be unique, so 16 bytes is plenty. The secret must be unpredictable as well as unique, because it's the proof of identity; 32 bytes or more is recommended. Increasing key length doesn't improve security, but shortening the secret does meaningfully weaken it.
You might also like
Popular tools from other categories that share themes with this one.