← All text tools

API Key and Secret Generator

Generate random API keys, secrets and tokens in hex, Base64, Base62 or Base32 with a prefix such as sk_live_, several at once, with the entropy shown.

  • Free
  • No sign-up
  • Works on any device

About API Key and Secret Generator

This generator makes random secrets from the browser's cryptographic generator, crypto.getRandomValues. Choose 128 to 512 bits, an encoding (hex, Base64, URL-safe Base64, Base62 or Base32), an optional prefix like sk_live_ and how many keys you want. Base62 uses rejection sampling so every character is equally likely, and the page states the exact entropy. For a JWT secret with HS256, RFC 7518 asks for at least 256 bits. The tool makes the string only; your server must store it, ideally as a hash, and recognise it.

How to use API Key and Secret Generator

  1. Pick the length in bits, the encoding and an optional prefix.
  2. Set how many keys you need and press the generate button.
  3. Copy the keys into your secret manager or environment variables, never into source code.

Why use this tool?

Also known as

Frequently asked questions

How many bits does an API key need?

128 bits is already out of reach for guessing. 256 bits is the common choice for secrets and is the minimum for HS256 signing keys.

Is it safe to generate keys in a web page?

The keys are made on your device with a cryptographic generator and never sent anywhere. Still, store them as secrets and rotate any key you have pasted into chats or tickets.

What is the prefix for?

A prefix such as sk_live_ shows what a key is and which environment it belongs to. It helps secret scanners find leaked keys and does not add to the entropy.

Is API Key and Secret Generator free?

Yes. API Key and Secret Generator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put API Key and Secret Generator on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

Related tools