{
  "slug": "html-entity-encoder",
  "name": "gizza-ai/html-entity-encoder",
  "version": "0.1.0",
  "title": "HTML Entity Encoder — gizza.ai",
  "description": "Encode text into HTML character entities — pick a scope (minimal, all non-ASCII, or every named character) and a format (named, decimal, or hex). Runs in your browser.",
  "tags": [
    "html entity encoder",
    "html encode",
    "html escape",
    "encode special characters",
    "named entities",
    "numeric entities",
    "html character reference",
    "escape html",
    "ampersand encode",
    "xss escape"
  ],
  "category": "encoding",
  "urls": {
    "page": "https://gizza.ai/tools/html-entity-encoder/",
    "markdown": "https://gizza.ai/tools/html-entity-encoder/index.md",
    "descriptor": "https://gizza.ai/tools/html-entity-encoder/tool.json",
    "deep_link_example": "https://gizza.ai/tools/html-entity-encoder/?text=%3Cb%3ETom%20%26%20Jerry%27s%20caf%C3%A9%3C%2Fb%3E%20%E2%80%94%20%E2%82%AC5&scope=minimal&format=named"
  },
  "cli": "gizza tool html-entity-encoder \"<b>Tom & Jerry's café</b> — €5\"",
  "tool": {
    "description": "Encode literal characters into HTML character references (entities). Two orthogonal options control the result. 'scope' selects WHICH characters are encoded: 'minimal' (default) encodes only the five HTML/XML-sensitive characters & < > \" '; 'non-ascii' also encodes every character above U+007F (accents, symbols, emoji) for pure-ASCII output; 'named' also encodes every character that has an HTML5 named entity. 'format' selects HOW each character is written: 'named' (default) uses the HTML5 named entity where available (&amp;, &copy;, &mdash;) and falls back to a decimal numeric reference otherwise; 'decimal' always uses &#NNN;; 'hex' always uses &#xHH;. The apostrophe becomes &apos; in named format and &#39; / &#x27; in the numeric formats. To go the other way (turn entities back into characters) use the html-entity-decoder tool.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "format": {
          "default": "named",
          "description": "How each encoded character is written. 'named' (default) uses the HTML5 named entity where one exists (&amp;, &copy;, &mdash;) and falls back to a decimal numeric reference otherwise. 'decimal' always uses &#NNN;. 'hex' always uses &#xHH;.",
          "enum": [
            "named",
            "decimal",
            "hex"
          ],
          "type": "string"
        },
        "scope": {
          "default": "minimal",
          "description": "Which characters to encode. 'minimal' (default) encodes only the five HTML/XML-sensitive characters & < > \" '. 'non-ascii' also encodes every character above U+007F (accents, symbols, emoji). 'named' also encodes every character that has an HTML5 named entity. The five sensitive characters are always encoded.",
          "enum": [
            "minimal",
            "non-ascii",
            "named"
          ],
          "type": "string"
        },
        "text": {
          "description": "The text to encode into HTML character references, e.g. '<b>Tom & Jerry\\'s café</b>'.",
          "type": "string"
        }
      },
      "required": [
        "text"
      ],
      "type": "object"
    }
  }
}