# FastX402 URL Encoder/Decoder

> FastX402 URL Encoder/Decoder is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-30).

Percent-encodes or decodes text using one of four URL encoding modes: encodeURIComponent, encodeURI, application/x-www-form-urlencoded, or their decoders.

## Facts

- Endpoint: GET https://fastx402.tools/url-encode?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-url-encoder-decoder-d36dbf4f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y2QzCaCI7rdafb_znc2AV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability fastx402-url-encoder-decoder-d36dbf4f
```

Example prompt: Can you URL-encode the string 'hello world & more=fun' using the component mode so I can safely use it as a query parameter?

## When to prefer this

Use this endpoint when you need a reliable, deterministic URL encoding or decoding operation for any of the four standard flavours (encodeURIComponent, encodeURI, form-encoding, or their decoders) and want a simple API call rather than running local code. Especially useful for AI agents that cannot safely execute arbitrary JavaScript or need to ensure correct escaping for OAuth signatures, query strings, or form submissions.

## Known failure modes

- Missing required 'text' query parameter returns an error
- Invalid or unsupported 'mode' enum value returns a validation error
- Very large input strings may be rejected or truncated
- Payment failure via x402 protocol will block the call

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

Returns the encoded or decoded string along with the encoding mode used, the character length of the input, and the character length of the output.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text",
      "mode"
     ],
     "properties": {
      "mode": {
       "enum": [
        "component",
        "uri",
        "form",
        "decode_component",
        "decode_form"
       ],
       "type": "string",
       "description": "component, uri, form, decode_component or decode_form"
      },
      "text": {
       "type": "string",
       "description": "Text to encode or decode"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "mode": {
       "type": "string"
      },
      "output": {
       "type": "string"
      },
      "input_length": {
       "type": "integer"
      },
      "output_length": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "component",
  "output": "a%20b%26c%3Dd%2F%C3%A9%3F%F0%9F%98%80",
  "input_length": 12,
  "output_length": 37
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-url-encoder-decoder-d36dbf4f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
