{"uid":"cap_1C3-le9hnUJrpLfBftFIf","slug":"fastx402-lab-base64-base64url-encode-decode-dc2fd8d3","name":"FastX402 Lab – Base64 / Base64url Encode & Decode","description":"146 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.","url":"https://fastx402.tools/base64-convert?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"],"type":"string"},"queryParams":{"type":"object","required":["text","mode"],"properties":{"mode":{"enum":["encode","decode","encode_url","decode_url"],"type":"string","description":"encode, decode, encode_url or decode_url"},"text":{"type":"string","description":"Text to encode, or Base64 to decode"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"mode":{"type":"string"},"result":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"mode":"encode","result":"TWVyaGFiYSBkw7xueWEg4pyT"}},"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_TEFlf3OKvvxrXA3nbcwly","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 UTF-8 text to standard Base64 or Base64url, or decodes Base64/Base64url back to UTF-8 text, returning exact results safe for HTTP headers, data URLs, and API payloads.","exampleAgentPrompt":"Can you encode the string 'Hello, world! 🌍' to standard Base64 for me so I can use it in an HTTP Authorization header?","exampleUseCases":[{"title":"Basic Auth header construction","prompt":"I need to encode 'myuser:mysecretpassword' to Base64 so I can put it in a Basic Authorization header — can you do that encode for me?"},{"title":"Data URL image prefix encoding","prompt":"Encode this SVG snippet '<svg xmlns=\"http://www.w3.org/2000/svg\"/>' to Base64 so I can embed it as a data URL in an HTML page."},{"title":"JWT payload decoding","prompt":"Can you decode this Base64url segment 'eyJzdWIiOiIxMjM0NTY3ODkwIn0' back to plain text so I can read the JWT payload?"}],"resultDescription":"A JSON object with two fields: 'mode' (the operation performed: encode, decode, encode_url, or decode_url) and 'result' (the converted string — Base64, Base64url, or decoded UTF-8 text as appropriate).","failureModes":["Invalid Base64 input when decoding (malformed padding or illegal characters) may return an error or garbled output","Missing required 'text' or 'mode' query parameters returns a 4xx error","Passing binary non-UTF-8 content as the text field may produce incorrect decode results since the service targets UTF-8","Payment failure (x402) blocks the request before encoding occurs"],"whenToPreferThis":"Choose this endpoint when you need deterministic, exact Base64 or Base64url encoding/decoding with correct padding and alphabet selection — particularly when you have encountered issues with wrong padding or alphabet mismatches in other tools. It is ideal for AI agents that need to construct HTTP Authorization headers, data URLs, or prepare API payloads without a local runtime capable of running encoding functions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:40:56.909Z","isFirstParty":false,"canonicalSlug":"fastx402-lab-base64-base64url-encode-decode-dc2fd8d3"}