{
    "slug": "html-and-text-converter",
    "name": "HTML and Text Converter",
    "url": "https://directory.milunir.com/text-tools/text-editors/html-and-text-converter/",
    "description": "Turn plain text into safe HTML paragraphs with &amp; and &lt; escaped, or strip tags from HTML and decode entities back to readable text.",
    "inputs": {
        "type": "object",
        "properties": {
            "mode": {
                "type": "string",
                "enum": [
                    "to_html",
                    "to_text"
                ],
                "description": "Mode",
                "default": "to_html"
            },
            "text": {
                "type": "string",
                "description": "Plain text"
            },
            "html": {
                "type": "string",
                "description": "HTML markup"
            }
        },
        "additionalProperties": false
    },
    "outputs": [
        {
            "key": "primary",
            "label": "Converted result"
        },
        {
            "key": "input_chars",
            "label": "Characters in"
        },
        {
            "key": "output_chars",
            "label": "Characters out"
        },
        {
            "key": "paragraphs",
            "label": "Paragraphs"
        },
        {
            "key": "tags",
            "label": "Tags removed"
        },
        {
            "key": "lines",
            "label": "Output lines"
        }
    ],
    "modes": [
        {
            "id": "to_html",
            "label": "Text to HTML",
            "inputs": [
                "text"
            ]
        },
        {
            "id": "to_text",
            "label": "HTML to text",
            "inputs": [
                "html"
            ]
        }
    ],
    "feed": null,
    "endpoint": "https://api.tools-directory.workers.dev/v1/tools/html-and-text-converter",
    "mcp_tool": "html_and_text_converter",
    "example": {
        "inputs": {
            "mode": "to_html",
            "text": "Fish & chips < £5"
        },
        "output": "Converted result: <p>Fish &amp; chips &lt; £5</p>"
    }
}