When entity escape matters
API contracts often ship rich text inside JSON: a Terms & Conditionsdescription field holds . Pasting it raw breaks string quoting or tempts you to fix commas in the wrong layer. CMS exports frequently arrive as <p> literals while React components expect decoded HTML before dangerouslySetInnerHTML.
Legacy tickets, mail-merge templates, and JSP pages love & in copy. It looks fine in Postman until the database stores the entity text literally. Security reviews sometimes ask you to encode user probes before persistence.
HTML Entity Converter encodes only five characters (& < > " ' → standard entities). Decode uses the browser DOM, so numeric forms like <, hex <, and named entities such as usually resolve—encode mode is not a full HTML sanitizer.
Treat this page as a string hygiène step, not a policy engine. Compliance teams still need server-side rules for untrusted HTML.
Mobile apps that embed WebViews sometimes double-unescape HTML; record whether the API should serve escaped or decoded text so Android and iOS do not fight the same field.
Encode vs decode on the page
Toggle Encode or Decode, paste, run. Encode when the HTML must live inside a JSON string: "body": "<em>Hi</em>".
Decode when CMS hands you entities and you need visible angle brackets: <div class="note">OK</div> should become .
Smart clipboard detection routes < fragments here; the Chrome extension workflow guide can open the tool with ?input= from a selection.
Processing stays in the browser—WoDeTool does not archive your paste. Close the tab on shared machines; do not leave customer contract HTML in the field.
Pair with JSON and replace tools
After encoding, paste into JSON Formatter to catch double-escaping (\ plus &) before you blame the API.
When only one column in a CSV export needs & → &, use Text Replacer with tight scope instead of blanket replace across logs.
URL query & is percent-encoding, not HTML entities—use URL Encoder. Mixing layers causes sign=abc&page=2 decode accidents.
If JSON parsing fails because HTML rode in as the body, follow the broken webhook JSON guide first, then return here for entity work.
Staging diffs should record whether the payload was entity-encoded at rest or only in transit; downstream mobile clients sometimes decode twice.
Contract tests can snapshot the encoded string once and diff only when marketing copy changes; that catches accidental decode deploys faster than visual QA on long legal pages.
When webpack or Vite inlines HTML as template strings, the escape layer in your bundler may already encode quotes—run encode here only on the fragment you paste into JSON, not on the whole bundled file.
Workflow (diagram)
Order: twenty-character sample encode → JSON validate → full CMS export; decode path with " first, then multi- blocks.
Triage (diagram)
Encoding does not stop XSS: entity-escaped user markdown only blocks naive angle brackets; UGC still needs server allow-lists.
FAQ
QDoes encode cover all Unicode?
ANo—only & < > " '. Other code points pass through unchanged.
QIs decode safe?
AIt uses a temporary textarea + innerHTML locally; avoid hammering untrusted megabyte payloads.
QXML Formatter instead?
AUse XML Formatter for tree structure; use this tool for single-field entity flip-flop.
QProduction secrets in the field?
AData does not upload, but screenshots leak—use synthetic samples in tickets.
Worked example (step by step)
1. CMS export: <p>Refunds<strong>7</strong> days</p>.
2. Open HTML Entity Converter, decode, confirm Refunds7 days.
3. To store escaped text, encode again for the API description string.
4. Build JSON {"id":1,"description":"<p>...</p>"}, validate in JSON Formatter.
5. JSON Diff against yesterday's sample.
6. Subject line A&B Co → A&B Co before template merge.
7. Logs mixing %26 and &: URL path via URL Encoder, HTML via this tool.
8. File a note in the PR whether mobile clients decode entities client-side.
Spec anchors (HTML entities)
WHATWG and browser HTML parsers treat named and numeric character references as part of the tokenization story; your job in integration work is narrower: keep JSON string literals valid while preserving the HTML the business team expects to render. When product says “store the banner HTML,” clarify whether they mean escaped text in the column or decoded markup in the CDN cache.
Email clients add another wrinkle: some clients rewrite into spaces while web views keep non-breaking space semantics. Encoding on WoDeTool does not choose for you—it only handles the five delimiter characters—so spacing bugs may still require template edits outside this tool.
If your OpenAPI schema marks a field as string with format: html, ask whether validators run server-side. Encoding here helps you produce a safe literal for a JSON fixture, not to satisfy an OWASP checklist by itself.
Pair with the debug API responses guide when the API returns HTML error pages inside a 200 wrapper: entity work comes after you prove the bytes are JSON, not angle-bracket soup pretending to be data.
RSS and Atom feeds sometimes escape titles differently from HTML bodies; if your reader app shows raw entities in the headline, decode the title field in isolation instead of mutating the entire feed XML in one pass.
Edge cases worth a second look
Apostrophe encoding uses ' on encode; decode still accepts ' if the browser resolves it. Mixed quotes in attributes (class="note") survive encode/decode round-trips when you stay inside the five-character map.
Double-encoded entities (<) show up when a CMS exports twice or when a log pipeline HTML-escaped an already escaped field. Decode once, inspect, decode again only if you understand the storage history—blind double decode turns real ampersands into entities incorrectly.
When migrating from JSP to SPA, grep for < in the database before you bulk decode in production; some rows may intentionally store literal entity text for compliance PDFs.
Copy-paste reference
Encode in HTML Entity Converter when JSON must carry literal < in a string field.
{"helpHtml":"Use <strong>bold</strong> in the template"}