{"ok":true,"result":{"slug":"html-formatter","name":"HTML Formatter","summary":"Pretty-print HTML with consistent indentation, or minify it (collapse whitespace, drop comments). <pre>, <textarea>, <script> and <style> contents are kept as written when minifying.","description":"Beautify messy HTML with clean indentation, or minify it by collapsing whitespace and removing comments while keeping pre, textarea and script content intact.","method":"POST","endpoint":"/api/v1/tools/html-formatter","plan":"free","mcpName":"html_formatter","input":{"type":"object","additionalProperties":false,"properties":{"input":{"type":"string","description":"The HTML.","maxLength":200000},"mode":{"type":"string","description":"format (pretty-print) or minify.","default":"format","enum":["format","minify"],"maxLength":200000},"indent":{"type":"integer","description":"Spaces per indent level when formatting.","default":2,"minimum":1,"maximum":8},"tabs":{"type":"boolean","description":"Indent with tabs instead of spaces when formatting.","default":false},"wrapLength":{"type":"integer","description":"Wrap lines longer than this many characters when formatting; 0 disables wrapping.","default":0,"minimum":0,"maximum":1000},"wrapAttributes":{"type":"string","description":"Attribute layout when formatting: auto, force (each on its own line), force-aligned or force-expand-multiline.","default":"auto","enum":["auto","force","force-aligned","force-expand-multiline"],"maxLength":200000},"removeComments":{"type":"boolean","description":"When minifying, remove <!-- comments --> (conditional comments are kept).","default":true},"removeWhitespaceBetweenTags":{"type":"boolean","description":"When minifying, remove all whitespace-only text between tags, not just next to block elements. Can join inline elements together.","default":false}},"required":["input"]},"example":{"input":"<ul><li><a href=\"/\">Home</a></li><li>About</li></ul>"},"randomOutput":false,"network":false,"docs":"https://pithlab.com/developers/tools/html-formatter","page":"https://pithlab.com/tools/html-formatter"}}