/pass Random Password & Key Generator
High-entropy secrets from a CSPRNG — passwords, API keys, tokens. Tune the length and character set to fit wherever it is going. HTTPS-only, and never written to a log.
curl https://curlhub.sh/pass?len=32
Usage
With curl
curl https://curlhub.sh/pass
curl "https://curlhub.sh/pass?len=40"
curl "https://curlhub.sh/pass?len=32&charset=hex"
With the CLI
curlhub pass?len=32
curlhub "pass?len=32&charset=hex"
Structured output for scripts
curl -s 'https://curlhub.sh/pass?len=24' -H 'Accept: application/json'
Output
curl https://curlhub.sh/pass?len=24
nfHQWVn9UsJx11PHKKf3C1H8
Parameters
| Input | What it does |
|---|---|
?len= | Length of the secret. Clamped up to a safe minimum if you ask for too few. |
?charset= | Character set — e.g. the default mix, alnum, or hex. Match whatever your target accepts. |
Accept: application/json | Return {"password": "…"} as JSON instead of plain text. |
Recipes
A 32-char hex API key
curl -s "https://curlhub.sh/pass?len=32&charset=hex"
Rotate a .env secret
curl -s 'https://curlhub.sh/pass?len=40'
Generated server-side over TLS and never stored — paste it straight into your secret manager.