{"uid":"cap_whnA6FPnXjWE09uLOvP4t","slug":"base64-encoder-and-decoder-2931e5af","name":"Base64 Encoder and Decoder","description":"Base64 encode or decode any UTF-8 text in either the standard or the URL-safe alphabet. Reports the input byte length and, on decode, whether the bytes are valid UTF-8. Computed locally, no API key.","url":"https://llmrt-companion.manhliemcn4euwlu.workers.dev/base64-402?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["order_id"],"properties":{"text":{"type":"string"},"action":{"type":"string"},"urlsafe":{"type":"string"},"order_id":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.000958","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.000259/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.000259","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.000259","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ikMEbAK6qlcRjl3kJ2oL6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.000259","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes UTF-8 text to Base64 or decodes Base64 back to UTF-8, supporting both standard and URL-safe alphabets, with byte-length reporting.","exampleAgentPrompt":"Can you base64-encode the text 'Hello, World!' using the URL-safe alphabet and tell me how many bytes that input is?","exampleUseCases":[{"title":"Encode API credentials for HTTP header","prompt":"Base64-encode the string 'myusername:mypassword' using the standard alphabet so I can put it in a Basic Auth header."},{"title":"Decode JWT payload to readable JSON","prompt":"Decode this base64 URL-safe string for me: 'eyJ1c2VyIjoiYWxpY2UiLCJyb2xlIjoiYWRtaW4ifQ' and tell me if the result is valid UTF-8."},{"title":"Verify byte length before encoding","prompt":"I need to know the byte length of the UTF-8 text 'Héllo wörld' — can you encode it to standard base64 and report the input byte count?"}],"resultDescription":"Returns the Base64-encoded or decoded string, the input byte length, and (on decode) a flag indicating whether the decoded bytes are valid UTF-8. Computed locally with no external dependencies.","failureModes":["Invalid base64 input on decode returns an error indicating malformed encoding","Non-UTF-8 bytes in decoded output flagged as invalid UTF-8 rather than returned as garbled text","Missing required 'text' query parameter results in a bad request error","Unsupported action value returns an error indicating expected 'encode' or 'decode'"],"whenToPreferThis":"Use this endpoint when you need a quick, stateless, no-credential Base64 encode or decode operation — especially when you need URL-safe alphabet support or byte-length metadata alongside the conversion. Ideal for agents that cannot run local code or need a reproducible, auditable micro-service call rather than relying on in-context string manipulation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-13T18:31:32.146Z","isFirstParty":false,"canonicalSlug":"base64-encoder-and-decoder-2931e5af"}