{"uid":"cap_PtgJGKaeuxWS-jSW0w3aK","slug":"classic-ciphers-and-encodings-base-encoding-decoding-717e7071","name":"Classic Ciphers and Encodings – Base Encoding/Decoding","description":"Convert text or bytes to and from binary, octal, hex, decimal, Base32 (RFC 4648), Base58 (Bitcoin) and Base64.","url":"https://text-ciphers.x402tookit.com/encode-text?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","format"],"properties":{"mode":{"type":"string","description":"encode (default) or decode"},"text":{"type":"string","description":"Text to encode, or the encoded string to decode (up to 3000 characters)"},"format":{"type":"string","description":"One of: binary, octal, hex, decimal, base32, base32hex, base58, base64, base64url"},"inputType":{"type":"string","description":"For encode: text (UTF-8, default) or hex (the input is bytes written as hex)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"hex":{"type":["null","string"]},"asOf":{"type":["null","string"]},"mode":{"type":["null","string"]},"bytes":{"type":["null","number"]},"input":{"type":["null","string"]},"format":{"type":["null","string"]},"output":{"type":["null","string"]},"secure":{"type":["boolean","null"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_w8N7xfjV8j1b7cuw00jJB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts text or bytes to and from binary, octal, hex, decimal, Base32, Base58 (Bitcoin), Base64, and related encodings.","exampleAgentPrompt":"Encode the text 'Hello, World!' as Base64 for me.","exampleUseCases":[{"title":"Base64-encode payload for API","prompt":"Encode the string 'username:password' as Base64 so I can use it in an HTTP Basic Auth header."},{"title":"Decode Base58 Bitcoin address bytes","prompt":"Decode this Base58 string '3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy' back to hex bytes so I can inspect the raw data."},{"title":"Represent binary data as hex","prompt":"Convert the text 'secret message' into its hex representation so I can embed it in a config file."}],"resultDescription":"Returns a JSON object containing the encoded or decoded output string, the format used, the mode (encode or decode), input echo, byte count, and a hex representation of the result. Also includes metadata fields like source, asOf timestamp, and security/degraded flags.","failureModes":["Missing required 'text' or 'format' query parameter returns an error","Invalid 'format' value (not in allowed enum) returns a validation error","Input text exceeds 3000 character limit and is rejected","Invalid hex input when inputType=hex causes a parsing error","Attempting to decode malformed Base64/Base32 returns a decoding error"],"whenToPreferThis":"Choose this endpoint when you need fast, reliable encoding or decoding between common base formats (binary, octal, hex, decimal, Base32, Base58, Base64, Base64url) for text or byte data. Prefer it over cipher-based siblings when you need standard interoperable encodings rather than classical substitution ciphers. Ideal for developer tasks like preparing HTTP headers, encoding binary payloads, or inspecting raw byte values.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:20:16.354Z","isFirstParty":false,"canonicalSlug":"classic-ciphers-and-encodings-base-encoding-decoding-717e7071"}