{"uid":"cap_HB1aBAW1Y8OY58NpW4u9P","slug":"url-encode-decode-4576e407","name":"URL Encode/Decode","description":"URL encode or decode a string (percent-encoding) for query, path or fragment.","url":"https://conclavex402p04.pythonanywhere.com/u/urlcode?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object"},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"pathParams":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"encoded":"a+b"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_aKiJtjFZ9ciHCIAlSotXg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Percent-encodes or percent-decodes a string for use in URL query, path, or fragment components.","exampleAgentPrompt":"URL-encode the string 'hello world & more=1' so I can safely embed it as a query parameter in a URL.","exampleUseCases":[{"title":"Safe query parameter embedding","prompt":"I need to URL-encode the string 'café & résumé=true' so I can attach it as a query param without breaking the URL."},{"title":"Decoding a percent-encoded API response","prompt":"Can you URL-decode this string I got back from an API: 'search%3Dhello%20world%26page%3D2' so I can read what it actually says?"},{"title":"Encoding a file path for a REST request","prompt":"Encode the path segment '/users/john doe/files/my document.pdf' into percent-encoding so it's valid in a URL path."}],"resultDescription":"A JSON object containing the encoded or decoded string result, e.g. {\"encoded\": \"hello+world\"} or {\"decoded\": \"hello world\"}, depending on the operation requested.","failureModes":["Missing or malformed 'input' body returns a 400 or validation error","Passing a non-string value as the text to encode/decode may cause a schema validation failure","Ambiguous operation (encode vs decode not specified) may return unexpected output","Network timeout or server error on pythonanywhere.com returns a 5xx response","Payment not included or insufficient USDC causes x402 payment-required rejection"],"whenToPreferThis":"Choose this endpoint when an agent needs a reliable, pay-per-call percent-encoding or decoding operation without setting up a local library — especially in sandboxed environments, no-code pipelines, or when normalizing user-supplied strings before constructing URLs dynamically.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T06:39:19.610Z","isFirstParty":false,"canonicalSlug":"url-encode-decode-4576e407"}