HTML entity encoder and decoder

Show code on a web page without the browser running it, or read text that arrived full of & and '. Encode and decode in one place.

How it works

  1. Paste the text or the HTML.
  2. Choose Encode or Decode.
  3. Press Convert and copy the result.

Which characters must be escaped in HTML?

The ampersand, the less-than and greater-than signs and, inside attributes, the double and single quote. Those five are what this tool encodes.

When should I encode non-ASCII characters?

Only when the page or the email system is not UTF-8. Then accents and symbols are safer as numeric entities such as é.

Does decoding handle named entities?

The common ones (amp, lt, gt, quot, apos, nbsp, copy, reg, trade, euro, pound, hellip, the dashes and angle quotes) and every numeric entity.

Use it from ChatGPT, Claude or your own agent

This tool is also a function an AI agent can call for you. It needs the same free account as this page, nothing else.

Fields

  • text (text, required): Text or HTML
  • mode ("encode" | "decode", optional): Action
  • non_ascii (true | false, optional): Also encode accents and symbols

A call that works

POST https://orkosi.com/api/v1/public/tools/html-entity-encoder/run
Authorization: Bearer <api_key>

{
  "input": {
    "text": "<a href=\"/pricing\">Plans & pricing</a>",
    "mode": "encode"
  }
}

Need an account? One request creates it and answers the key: POST https://orkosi.com/api/v1/public/signup. In Claude or ChatGPT, add the Orkosi connector and sign in: https://orkosi.com/api/v1/public/mcp.

This tool as Markdown · Connect an AI assistant