Inspect isolated HTML components
Expose structure to find containers and attributes. The form does not resolve components or expressions specific to Astro, JSX or other template languages.
Format HTML or remove ordinary comments locally while retaining text whitespace and script content. No page execution or upload is required.
This input could not be processed. Check its syntax and the limitations explained below.
Reformat an HTML document or fragment to inspect its structure without opening the code as an active page. The formatter recognizes tags, attributes and text rather than splitting on every angle bracket. A second action conservatively removes ordinary comments. Scripts are not executed, links and images are not fetched, and your page is not uploaded to a remote formatting service.
Formatting parses HTML and applies structured layout with strict whitespace sensitivity. It does not mechanically put every tag on a new line: inserting separation between inline elements can change visible spaces in a browser.
Embedded script and style content is not reformatted by a second JavaScript or CSS transformation. Use the dedicated language formatters for that. Attribute layout and spelling may be normalized, so output is not an exact reproduction of source writing.
Comment removal does not globally compress whitespace. It deletes only ordinary comment spans recognized by the parser. All other characters remain unchanged, including spacing in text, pre blocks and scripts. Comments marked !, directives starting with # and recognized conditional comments are retained.
Conservative handling does not cover every application convention. Frameworks may use apparently ordinary comments as hydration markers. Keep generated output in its build pipeline and check those conventions before deleting comments. Successful layout is not comprehensive validation of accessibility, SEO or behavior.
Paste a fragment or import a .html file. Exclude Markdown fences and template code the HTML parser cannot interpret.
Format for review or remove ordinary comments. The second action is not complete page minification including scripts and styles.
Inspect inline text, attributes and markers before copying or downloading. Source edits hide old output; reset clears both fields.
Expose structure to find containers and attributes. The form does not resolve components or expressions specific to Astro, JSX or other template languages.
Copy a readable excerpt into technical documentation. Elements remain text here; the tool does not generate a screenshot of their rendering.
Delete ordinary comments from static fragments without collapsing paragraph or preformatted whitespace. No size reduction is expected when no comments are present.
The fragment may remain on one line with a normalized final newline. Formatting does not force breaks that could introduce visible whitespace.
Input
<div><span>x</span></div>Result
<div><span>x</span></div>
Only the note comment disappears. The paragraph keeps spaces around b and pre keeps its spacing and line break.
Input
<!-- note --><p>a <b>b</b> c</p><pre> x y
z</pre>Result
<p>a <b>b</b> c</p><pre> x y
z</pre>Separation between inline elements can create visible whitespace. Formatting respects this context instead of putting every tag on a separate line.
No. It intentionally retains all other text, including significant spaces and scripts. Without ordinary comments, output may match input exactly.
They are not executed, and HTML layout does not apply embedded-language formatting. Use JavaScript and CSS tools to transform those excerpts explicitly.
Check framework conventions first. Comments may carry markers used by its runtime. An action suitable for static HTML does not replace the framework’s build process.
Related tools
Tools similar or complementary to this one.
Format or minify CSS to improve readability or reduce file size.
Format JavaScript, TypeScript or JSX for easier reading without executing code. Processing runs locally in your browser.
Format, minify, and validate an XML document directly in your browser.
Understand ISO 8601 week numbers, Unix timestamps in seconds or milliseconds, and the difference between human-readable dates and technical time values.