Free PKCE Code Verifier & Challenge Generator
Generate a spec-compliant PKCE pair · a random code_verifier and its SHA-256 code_challenge · for testing OAuth 2.0 authorization-code flows.
100% client-side · nothing you enter is ever sent to a server or stored.
Preview · sign in with a free account to run it
RFC 7636 allows 43–128 characters.
Where each value goes
https://auth.example.com/authorize ?client_id=YOUR_CLIENT_ID &redirect_uri=https://app.example.com/callback &response_type=code &code_challenge=<code_challenge> &code_challenge_method=S256
The code_challenge goes in the authorization request above · keep the code_verifier on the client and send it later in the POST to the token endpoint as code_verifier.
How to use it
- Choose a verifier length from 43 to 128 characters.
- Generate a code_verifier. The code_challenge is derived from it automatically.
- Send the code_challenge (with code_challenge_method=S256) in the authorize request, and the code_verifier in the token request.
Example
The test values from RFC 7636, Appendix B.
Input
code_verifier dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
Result
code_challenge E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM method S256 = base64url(SHA-256(verifier))
Where each value goes
- code_verifier
- A random secret your app keeps until the end of the sign-in. It's sent only in the final token request.
- code_challenge
- The SHA-256 hash of the verifier, sent in the first authorize request. An attacker who intercepts the authorization code can't exchange it without the verifier.
- S256 vs plain
- With plain, the challenge is the verifier itself, so it protects nothing if the first request is seen. Always use S256.
Go deeper
Page updated
Frequently asked questions
What is PKCE and when do I need it?
PKCE (RFC 7636) protects the OAuth authorization-code flow against code interception. It's mandatory for public clients like SPAs and mobile apps · and recommended for every client in OAuth 2.1.
Why S256 instead of plain?
With plain, the challenge equals the verifier, so anything that can read the authorization request can replay it. S256 sends only the SHA-256 hash · the verifier itself never appears until the token exchange.
Do I need PKCE if my app has a client secret?
OAuth 2.1 recommends PKCE for every client. For mobile apps and SPAs, which can't keep a secret, it's essential.
Want the full picture?
This tool covers one narrow check. A full SimplyScan runs 60 checks across 14 categories · exposed keys, RLS, XSS, auth, and speed · in 30 seconds.
Run a full security scanRelated tools
Basic Auth Generator
Turn a username and password into a ready Authorization: Basic header · encoded locally, never transmitted.
CSP Generator
Build a Content-Security-Policy header from scratch · pick directives and sources, and get a copy-ready header with the risky options explained.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes from any text · instantly and entirely in your browser.