{"uid":"cap_keevpW5wGgBhmglK2gVqC","slug":"agent402-tools-html-entities-encoder-decoder-7f3da405","name":"agent402.tools HTML Entities Encoder/Decoder","description":"Encode text to HTML entities or decode them back. mode: encode (default) or decode.","url":"https://agent402.tools/api/html-entities","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mode":{"type":"string","description":"encode | decode"},"text":{"type":"string"}}},"responseSchema":{"type":"json","example":{"mode":"encode","result":"&lt;a href=&quot;x&quot;&gt;"}},"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_NhSuOrP7_hapOCcaPceH6","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 HTML entities or decodes HTML entity sequences back to plain text","exampleAgentPrompt":"Take this string — 'Hello <World> & \"Friends\"' — and encode it to HTML entities so it's safe to embed in a webpage.","exampleUseCases":null,"resultDescription":"Returns the transformed text string: either with special characters replaced by their HTML entity equivalents (e.g. < becomes &lt;, & becomes &amp;) in encode mode, or with HTML entity sequences converted back to their original characters in decode mode.","failureModes":["Missing or empty text field returns an error or empty result","Invalid mode value (not 'encode' or 'decode') may default to encode or return an error","Payment failure (402) if USDC balance is insufficient","Malformed JSON request body returns a 400-level error","Very large text strings may hit payload size limits"],"whenToPreferThis":"Use this endpoint when you need a quick, reliable API call to encode or decode HTML entities without running local code. Ideal for agents that need to sanitize user-generated content before inserting it into HTML, or parse HTML entity sequences from scraped web content into readable text.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:03.349Z","isFirstParty":false}