Loading the interactive tool… It runs in your browser — if it doesn't appear, enable JavaScript.
Generates a fresh PKCE code verifier and its SHA-256 challenge, plus a state value and an OpenID Connect nonce, all in your browser. Useful for testing an authorization flow by hand, debugging a client that isn't producing valid values, or checking your own implementation against a known-good reference.
Values come from `crypto.getRandomValues` and the hash from the Web Crypto API — nothing is transmitted, which matters because a verifier that has been seen by a third party provides no protection at all.
Frequently asked questions
What problem does PKCE actually solve?
Authorization code interception. Without it, anything that can capture the redirect — a malicious app registered for the same URI scheme, a proxy, a logged URL — can exchange the code for tokens. PKCE binds the code to a secret only the original client knows, so a stolen code is useless. It's now recommended for every OAuth client, not just mobile ones.
Should I use S256 or plain?
Always S256. The plain method puts the verifier itself in the authorization URL, so anything that can intercept the code can also read the verifier — which provides no protection whatsoever. Plain exists only for clients that genuinely cannot compute SHA-256, which in practice means none.
Can I reuse a verifier?
No. Generate a fresh one for every authorization request. Reusing it means an attacker who captured a previous verifier can redeem a future code, which is precisely the attack PKCE exists to stop.
What's the difference between state and nonce?
State is CSRF protection for the authorization request — you generate it, send it, and reject the callback if it doesn't come back unchanged. Nonce is OpenID Connect specific and binds the resulting ID token to your request, so a token issued for someone else's session can't be replayed against yours. They solve different problems and you want both.