{"uid":"cap_kryp6N28jIe7ltCIh3C20","slug":"html-entities-encode-19b6662c","name":"HTML Entities Encode","description":"309 deterministic pay-per-call tools for AI agents over x402 (USDC, Base). No signup, no API key: the payment is the identity.","url":"https://x402-toolbox.shablony-pro.workers.dev/util/html-entities-encode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"schema":{"type":"string"}}},"responseSchema":{"type":"json","example":{"ok":true,"paid":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_3YA_ouQKVohs75zjSLV13","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes a string by converting special characters into their HTML entity equivalents","exampleAgentPrompt":"Encode this string as HTML entities so it's safe to insert into an HTML page: '<script>alert(\"hello & goodbye\")</script>'","exampleUseCases":[{"title":"Sanitize user input for HTML display","prompt":"Take this user-submitted comment and encode all the special characters as HTML entities so it won't break or inject anything when I render it on my page: 'Hello <World> & \"everyone\"!'"},{"title":"Escape code snippet for web page","prompt":"I need to show a raw code example on my website — can you HTML-encode this snippet so the angle brackets and ampersands display as literal text instead of being interpreted as tags? The snippet is: '<div class=\"box\"> & </div>'"},{"title":"Prepare email content with safe HTML characters","prompt":"Encode this string into HTML entities before I insert it into an HTML email template: 'Special offer: 50% off — use code <SAVE50> & save!'"}],"resultDescription":"A JSON object with ok:true and paid:true, containing the HTML-entity-encoded version of the input string where special characters like <, >, &, \", and ' are replaced with their corresponding HTML entity representations (e.g. &lt;, &gt;, &amp;, &quot;, &#39;).","failureModes":["Missing or empty input schema parameter returns an error or empty result","Non-string input types may cause unexpected behavior","Payment failure via x402 returns 402 status before processing","Very large strings may hit Cloudflare Worker size or time limits"],"whenToPreferThis":"Choose this endpoint when you need a quick, no-signup, pay-per-call HTML entity encoding utility for AI agent workflows. Ideal when you want deterministic, serverless text escaping without managing API keys or standing up your own service. At $0.001 USDC per call over x402, it suits agentic pipelines that process occasional strings and need frictionless micropayment-based access.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T06:49:53.376Z","isFirstParty":false,"canonicalSlug":"html-entities-encode-19b6662c"}