{"uid":"cap_kHp-r7wpbWswI2KO8tCck","slug":"base64-encode-decode-2084fecf","name":"Base64 Encode / Decode","description":"Encode text to Base64 or decode Base64 back to plaintext. Pure CPU, instant. Use to move binary-safe payloads through JSON, or to read a Base64 blob.","url":"https://api.gadgethumans.com/base64?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"object","properties":{"queryParams":{"type":"object","required":["text"],"properties":{"mode":{"type":"string","description":"encode (default) or decode"},"text":{"type":"string","description":"Text to encode, or Base64 to decode"}}}}},"output":{"type":"object","properties":{"example":{"ok":true}}}}},"responseSchema":{"type":"json","example":{"ok":true}},"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_25_rk-F9QEKATgGw3uiqc","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 plain text to Base64 or decodes a Base64 string back to plaintext via a simple GET request.","exampleAgentPrompt":"Can you Base64-encode the text 'Hello, World!' for me so I can safely embed it in a JSON payload?","exampleUseCases":[{"title":"Encode API credentials for auth header","prompt":"Encode the string 'myuser:mypassword' in Base64 so I can use it in a Basic Auth header."},{"title":"Decode a Base64 blob from an API response","prompt":"I got this Base64 string back from an API — can you decode it to plaintext? The string is 'SGVsbG8sIFdvcmxkIQ=='"},{"title":"Prepare binary-safe payload for JSON","prompt":"I need to embed this text in a JSON field safely — Base64-encode the string 'data:image/png;binary content here' for me."}],"resultDescription":"Returns a JSON object with an `ok` boolean and the resulting string — either the Base64-encoded representation of the input text, or the decoded plaintext of the provided Base64 value.","failureModes":["Invalid Base64 input when mode=decode (malformed or padded incorrectly) may return an error or garbled output","Missing required `text` query parameter returns an error","Invalid `mode` value (not 'encode' or 'decode') may default to encode or return an error","Very long input strings may hit query string length limits"],"whenToPreferThis":"Use this endpoint when you need a fast, zero-setup Base64 encode or decode operation within an agent workflow — especially when preparing binary-safe payloads for JSON transport, constructing Basic Auth headers, or reading Base64-encoded API responses. Prefer this over implementing locally when the agent runtime lacks a built-in codec or when consistency and simplicity across heterogeneous environments matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-03T12:51:04.076Z","isFirstParty":false,"canonicalSlug":"base64-encode-decode-2084fecf"}