x402 tool
402 Payload Parser
Paste an X-PAYMENT header or a 402 Payment Required response and decode it to readable JSON — scheme, network, amount, payer, and pay-to, all broken out. Runs in your browser.
Decoded output appears here.
What this x402 parser does
The x402 protocol runs on the HTTP 402 Payment Required status code. A protected server answers an unpaid request with a 402 and a JSON body describing what it will accept; the client pays on-chain and retries with an X-PAYMENT header proving payment. This parser reads both sides of that exchange:
- X-PAYMENT header — a base64-encoded JSON payload. Paste the header value and the tool decodes it, surfacing the scheme, network, payer address, and signature (with an explorer link when the signature is an on-chain transaction).
- 402 response body — the raw JSON challenge. Paste it and the tool lists every option in
accepts[], converting the atomicmaxAmountRequiredinto a human-readable USDC amount and resolving each network.
Everything happens locally in your browser — nothing you paste leaves the page. To track x402 payments across a whole fleet of agents instead of one at a time, see 402.report.
Frequently asked questions
- What is an X-PAYMENT header?
- In the x402 protocol, after a server answers with HTTP 402, the client pays and retries the request with an X-PAYMENT header. Its value is a base64-encoded JSON object carrying the scheme, network, and a payment payload (signature, payer, and for EVM an EIP-3009 authorization). This tool base64-decodes it and pretty-prints the JSON.
- How do I decode a 402 Payment Required response?
- Paste the raw JSON body of the 402 response. The parser reads the x402Version and the accepts[] array, converting each payment requirement's atomic maxAmountRequired into a human-readable amount and resolving the network to a friendly label with an explorer link.
- Is my data sent anywhere?
- No. The parser runs entirely in your browser — nothing you paste is uploaded, logged, or stored. The page is a static file with no backend.
- Which networks does it understand?
- It resolves Solana, Base, Ethereum, and their testnets to friendly labels and block-explorer links, and shows any other network string as-is. Amounts assume USDC's 6 decimals.