English 简体中文 Tiếng Việt 日本語 한국어 हिन्दी Español Français العربية বাংলা Português Русский اردو Bahasa Indonesia Deutsch Naijá मराठी తెలుగు Türkçe தமிழ்
Generated locally · Never uploaded

Secure Key Generator

Create cryptographically secure API keys, encryption keys and access tokens with the browser Web Crypto API. Choose HEX, Base64, Base64URL or Base32; every operation stays on this device.

Use this tool for machine-readable credentials, not passwords you need to remember. Choose enough bytes for your security requirements.
This browser does not support crypto.getRandomValues, so secure keys cannot be generated. Use a current version of Chrome, Firefox, Safari or Edge.

Key generator

256 bits Very high strength
Encoding

Changing a setting generates fresh keys automatically; use the button to regenerate with the same settings.

Generated keys
Generating…

Random source: crypto.getRandomValues(), a cryptographically secure generator. Keys are not stored after refresh; copy or download them and keep them in a secret manager.

Encoding formats

The same random bytes can be represented in different text encodings. Choose the format required by your URL, JSON, configuration file or protocol.

HEX
0-9 a-f

Two hexadecimal characters represent each byte. The output is predictable in length and supported almost everywhere.

Best for: Configuration files, command lines, logs and debugging.

Base64≈1.34×
A-Z a-z 0-9 + / =

Compact binary-to-text encoding, but +, / and = need escaping in URLs and some filenames.

Best for: JSON/XML transport and general text storage.

Base64URL≈1.34×
A-Z a-z 0-9 - _

A URL-safe Base64 variant that uses - and _ and removes = padding.

Best for: JWT, OAuth tokens, cookies and URL parameters.

Base32≈1.6×
A-Z 2-7

Case-insensitive encoding without easily confused 0/O or 1/I/L characters.

Best for: TOTP secrets, DNS records, barcodes and manual entry.

Frequently asked questions

Is this key generator secure?

Yes. It uses crypto.getRandomValues(), which draws from the operating system’s cryptographically secure random source instead of Math.random().

Are keys sent to a server or recorded?

No. Generation and encoding happen in this browser. The page does not store key history, and refreshing removes the current results.

Can I use these keys as login passwords?

They are designed for machine-readable secrets such as API keys, encryption keys and tokens. Use a password manager for passwords people must enter.

Can two generated keys be identical?

A collision is theoretically possible but negligible at recommended lengths. A 32-byte key has 2^256 possible values.

How should I store a generated key?

Put long-lived keys in a secret manager or protected environment variable. Never commit them to source control, chat or logs, and rotate them periodically.