PKCE Generator & S256 Validator

Generate secure PKCE verifier/challenge pairs, compare S256 values and build OAuth request examples locally.

Generate a verifier and S256 challenge

Generate creates a fresh 43–128-character code_verifier from the RFC 7636 unreserved alphabet. Rejection sampling over cryptographically secure random bytes avoids modulo bias. The default is 64 characters; state and nonce are independent 32-byte random values, encoded without Base64 padding. Nothing is generated or sent until you run the tool.

Derive and compare an existing pair

Derive accepts an exact verifier without trimming or normalizing it. S256 hashes its ASCII bytes with SHA-256 and Base64URL-encodes the digest without = padding. Compare validates a canonical 43-character challenge and reports matches: true or false. A mismatch is a completed comparison, not a syntax error. A valid-looking verifier does not prove that it was generated randomly.

RFC 7636 test vector

The public Appendix B verifier dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk produces E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM. Example loads this public vector; never reuse it in a real authorization flow.

Build the two request examples

Enable request examples to enter your registered endpoints, client ID and redirect URI. The authorization URL contains code_challenge and code_challenge_method=S256, and excludes code_verifier. The token form contains the original verifier and an authorization-code placeholder when no code is entered. Client authentication is a separate configuration: the generated form does not invent a client secret. Endpoints require HTTPS except local loopback HTTP; custom-scheme redirect URIs are supported. No endpoint is opened or contacted.

Use PKCE in an application

Keep the verifier associated with one authorization attempt and send it only to the registered token endpoint. Store and verify state according to the OAuth flow; when using OpenID Connect, handle nonce according to its rules. This tool does not authenticate users or validate an identity provider. It supports S256; it does not produce the discouraged plain transformation. Output and clipboard can contain the verifier, so clear them after testing. The page does not use localStorage or send input to a server.

FAQ

What is the difference between verifier and challenge?

The verifier is the secret random value retained by the client; S256 is its SHA-256 Base64URL transformation sent in the authorization request.

Does this log in or contact the endpoints?

No. It generates values and text examples locally. Application client authentication and callback validation remain your responsibility.

Does a valid pair prove a secure login?

No. Matching S256 values only verifies the transformation. It does not prove entropy, correct state handling or the identity of an authorization server.

Other Languages

PKCE Generator & S256 Validator — Base64.sh

PKCE Generator & S256 Validator

Generate secure PKCE verifier/challenge pairs, compare S256 values and build OAuth request examples locally.

Share:

References

How we make sure

We check this tool with the automated test suites linked below. Example checks are shown in their original language.

Verification method
Compare verifier-to-S256 challenge conversion and check lengths, alphabets and separate state/nonce values.
Comparison reference
RFC 7636 Appendix B and Node.js crypto SHA-256.
Verification scope
These samples and boundaries do not prove correctness for every input.
Test source and cases (select a file to read it)
  • query-auth-tools.test.js
    • PKCE RFC 7636 Appendix B and independent Node SHA-256 vectors
    • PKCE CSPRNG generation spans both limits, independent state/nonce and unique values

These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.