{"uid":"cap_l41xvbuau8ioXJcI445e2","slug":"text-encoding-and-decoding-converter-1b38b545","name":"Text Encoding and Decoding Converter","description":"Encode or decode text: base64, base64url (padding handled), hex, URL percent-encoding, and HTML entities. The conversions agents most often get wrong.","url":"https://toolbelt402.tpoborne.workers.dev/encode","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"op":{"enum":["encode","decode"],"type":"string"},"input":{"type":"string"},"format":{"enum":["base64","base64url","hex","url","html"],"type":"string"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_N2UCRZTrAGTjG4MEud6YU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes or decodes text between base64, base64url, hex, URL percent-encoding, and HTML entities formats","exampleAgentPrompt":"Can you decode this base64url string for me: 'SGVsbG8gV29ybGQ'? Just give me the plain text result.","exampleUseCases":[{"title":"Decode JWT payload for inspection","prompt":"I have this base64url-encoded JWT payload — 'eyJ1c2VySWQiOiAxMjM0LCAicm9sZSI6ICJhZG1pbiJ9' — can you decode it to plain text so I can read the JSON inside?"},{"title":"URL-encode query parameters for API call","prompt":"I need to URL percent-encode this string so I can safely put it in a query parameter: 'hello world & goodbye=true / yes?'"},{"title":"Escape HTML entities for safe display","prompt":"Can you encode this user-submitted text into HTML entities so it won't break my webpage when I render it: '<script>alert(\"xss\")</script>'?"}],"resultDescription":"Returns the converted string in the requested target encoding, along with metadata such as the detected source format, the target format, and the resulting encoded or decoded text value.","failureModes":["Invalid or malformed input string for the specified source encoding (e.g. non-hex characters in hex decode)","Unsupported encoding format requested","Empty input string","Payment failure or insufficient USDC balance for x402 call"],"whenToPreferThis":"Choose this endpoint when an AI agent needs reliable, correct encoding/decoding across base64, base64url (with proper padding handling), hex, URL percent-encoding, or HTML entities — especially for edge cases like base64url padding that agents frequently get wrong on their own. Prefer this over attempting in-context encoding logic when correctness is critical or when the encoding type is ambiguous.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:44:37.611Z","isFirstParty":false}