OAuth / PKCE Studio — Code Verifier, Challenge & Auth URL

Generate a PKCE code_verifier or check one you paste, then compute the S256 code_challenge. Build the authorization request URL, and check whether the state in the callback matches the one you sent. PKCE is for public clients and needs no client_secret. Token exchange needs network access, so this tool only shows the curl command.

On-device・No uploadMobile friendlyWorks offline

Your files and input are processed only inside your browser on this device and are never uploaded to our servers.

1. code_verifier and code_challenge

43–128. Default is 43

43–128 characters. Only letters, digits and - . _ ~ are allowed (RFC 7636 §4.1).

S256 is base64url(SHA-256(code_verifier)), without padding.

2. Authorization request URL

Compared with the state in the returned URL.

There is no client_secret field. PKCE is for public clients (apps in a browser or on a device, which cannot keep a secret), and it does not use a client_secret.

Enter the authorization endpoint, client_id and redirect_uri to get the URL.

3. Check the returned URL and exchange the token

Paste the URL the authorization server redirected to.

Once a code is read and the token endpoint and client_id are entered, the command appears.

How to use

  1. Click “Generate” to create a code_verifier, state and nonce together. A code_verifier you paste is checked for length (43–128) and allowed characters.

  2. The code_challenge is shown as S256: the base64url of the SHA-256 of the code_verifier. Do not use plain.

  3. Enter the authorization endpoint, client_id, redirect_uri and scope to get the authorization request URL. This tool does not open it, so copy it and paste it into a browser yourself.

  4. Paste the URL the authorization server redirected to (or the part after “?”). The code, state and error are read out, and the state is compared with the one you sent.

  5. After the state matches, enter the token endpoint to show the curl command. The tool does not send it, so run the command on your own machine.

What it does

Generate and check the code_verifier

Creates a 43–128 character value with crypto.getRandomValues. A pasted value is checked for length and for the unreserved characters (letters, digits, - . _ ~). Bad characters are shown by code point (U+), not by position.

S256 code_challenge

Computes the SHA-256 of the code_verifier and encodes it as base64url without padding. A unit test checks it against the RFC 7636 Appendix B example.

Authorization request URL

Builds response_type, client_id, redirect_uri, scope, state, nonce (for OIDC), and code_challenge. Spaces are written as %20. The URL is never opened or sent.

Reads the callback and checks the state

Takes code, state, error, error_description and iss from the returned URL. A state that differs from the one sent is flagged as a possible CSRF attempt.

Explains error responses

Shows the RFC 6749 §4.1.2.1 error codes (such as access_denied) with what they mean and what to do next.

Secrets hidden by default

The code_verifier, code and curl output are masked on screen. Nothing is saved to localStorage or elsewhere, and closing the page clears everything.

Use cases

  • Check the PKCE values (verifier and challenge) by hand in an authorization code flow for a SPA or mobile app
  • Find out why a code_challenge does not match, by checking length, characters and the S256 step in turn
  • See whether each parameter in an authorization URL is encoded correctly
  • Read whether the state in a returned URL matches, and what an error response means

Capability matrix

FeatureSupportNotes
code_verifier generation (43–128 characters, cryptographic random)Supported—
code_verifier check (length and allowed characters)Supported—
code_challenge (S256) calculationSupported—
code_challenge_method=plain calculationPartialIt can be calculated, but we advise against using it (RFC 7636 §4.2)
Authorization request URLSupportedOnly builds the string. It does not open or send it
OpenID Connect nonceSupported—
Reading the callback URL and checking stateSupported—
Fetching the server metadata (discovery)Not supportedNo network requests. Enter the endpoints yourself
Getting a token (running the exchange)Not supportedNo network requests. The tool only shows the curl command
Entering a client_secretNot supportedPKCE is for public clients. client_secret is not handled
ID token or JWT signature check, iss matchingNot supportediss is only shown; the tool does not check whether it is right
Extensions such as PAR, JAR and DPoPNot supportedThese specifications are not handled

Limits & notes

  • A code_verifier must be 43–128 characters (RFC 7636 §4.1). Values outside that range are neither calculated nor generated.
  • The authorization endpoint and redirect_uri are https URLs of up to 2,048 characters (http is allowed for localhost during development). A URL with # is not accepted (RFC 6749 §3.1).
  • A pasted callback can be up to 20,000 characters.
  • The SHA-256 (WebCrypto) runs only on pages served over https or on localhost.
  • This is a client-side check. It cannot confirm how the authorization server matches requests or issues tokens.

Privacy & safety

The code_verifier, state, callback URL and authorization URL are processed only in your browser and are never sent to or stored on a server. The code_verifier, code and curl output are masked by default, and closing the page clears everything.

FAQ

What is the relationship between code_verifier and code_challenge?
The code_verifier is a secret string made on your device. With S256, the code_challenge is the base64url of its SHA-256 (RFC 7636 §4.2). The authorization request carries the code_challenge, and the token request carries the code_verifier. The server checks that they match.
Should I use S256 or plain?
Use S256. With plain, the code_challenge and code_verifier are the same value, so anyone who sees the authorization URL also learns the code_verifier. RFC 7636 §4.2 says to use S256 whenever the client can.
What is state for, and what happens if it does not match?
state is a random value that ties a request to its response, which protects against CSRF (forged requests) (RFC 6749 §10.12). If the state in the returned URL differs from the one you sent, do not use that response.
Why is there no client_secret field?
PKCE is for public clients such as SPAs, mobile apps and desktop apps, which cannot keep a secret. It protects the authorization code without a client_secret. If your server can keep a secret, follow the authorization server’s documentation for how to use it.
Can this tool get a token?
No. The tool does not connect to any server. It only shows a curl command that sends the code and code_verifier to the token endpoint (grant_type=authorization_code; RFC 6749 §4.1.3 and RFC 7636 §4.5). You can convert the curl command with the curl converter.
When is a nonce needed?
With OpenID Connect, a nonce stops an ID token from being replayed (OIDC Core §3.1.2.1). It is optional in the authorization code flow. If you send one, the receiving side should check that it matches the nonce in the ID token. This tool does not check ID tokens.

Crypto Studio — Hash, HMAC, Encryption & Keys

Type text and see 12 hashes — SHA-256, SHA-3, BLAKE3 and more — at once. Verify webhook HMAC signatures, encrypt text with a password, generate key pairs and create or check bcrypt hashes, all on your own device with nothing uploaded.

No upload

Encode / Decode Studio — Base64, URL, JWT & more

Paste %E3%81%82, an eyJ… token or any encoded string — the format is detected and decoded instantly. Errors say exactly which character is wrong and why, and nothing leaves your browser.

No upload

Cookie / Set-Cookie Studio

Paste a Cookie header or Set-Cookie lines to see each attribute (Expires, Max-Age, Domain, Path, Secure, HttpOnly, SameSite, Partitioned) in a table, with points to check. The form also builds a Set-Cookie header and framework code.

No upload

JWK / JWKS Studio — Inspect Keys & Convert to PEM

Paste a JWK or JWKS to get a table of each key’s type, kid, size and thumbprint, with every problem explained against RFC 7517 and 7518. You can also convert a key to PEM. This tool does not verify signatures or generate keys.

No upload

Diff Tool — Text & Code Compare

Paste or drop two versions and see added and removed lines, plus the exact words that changed inside each line. Copy or save the result as a unified patch. Nothing leaves your browser.

No upload

UUID / ULID / NanoID / Token Generator

A UUID is ready the moment the page opens. Switch to UUID v7, ULID, NanoID or a random token, generate up to 10,000 at once and save them as .txt, .csv or .json. Paste an existing UUID or ULID to read its embedded time and version.

No upload

Last updated: