HTML Editor screenshot

HTML Editor

Edit HTML as a tree with a tolerant reader: rename tags, change attributes, move blocks, and copy the rebuilt document.

Privacy First
0 Runs
Updated 2026-11-07
Runs in your browser
No account needed
Nothing sent to a server
Output regenerated from the tree

HTML is read tolerantly — an unclosed <p> or a stray end tag does not stop the editor, because the reader is the same one the formatter uses — and laid out by block: elements go on their own lines, while an element holding text stays on one, since adding a newline around text is a visible change. Rename a tag, edit attributes, add and remove nodes, reorder them, and the document on the right follows. Nothing is uploaded.

This is a structural editor for HTML: your source is parsed into a tree, the tree is shown as an outline, and you edit elements and text in place rather than editing tags by hand.

Selecting an outline row opens its tag name, its attributes and its text. You can rename a tag, add or remove an attribute, add a child element or a text node, move a node up or down, and delete it.

The document panel re-serialises the tree with two-space indentation after every change, so the output is always well-formed markup even when you started from something ragged.

Editing by tree rather than by text

The source box and the tree stay in step: typing in the source re-parses it, and every tree operation re-renders the source. A parse error is reported above the source box instead of replacing the tree, so a half-typed tag does not lose your work.

Editing a tag name or an attribute value updates the serialized document immediately, which means the output panel is always the current state rather than a saved copy.

Undo and redo are keyboard operations: the outline keeps a history and binds the usual undo shortcut, and shift with the same shortcut redoes. Moving a node with shift and an arrow is a different operation from selecting it.

  • Rename a tag, add or remove attributes
  • Add a child element or a text node
  • Move a node, delete it, undo the last change

What serialisation normalises

The output is regenerated, not remembered. Attribute order within an element is the order the editor holds, the indentation is two spaces, and text nodes that were split in the source are written as they are in the tree.

That means the document panel can differ from your input even before you edit: whitespace between block elements and the original indentation are gone. Compare against the source box, not against the output panel, when you want to know what you typed.

How to use the outline

Paste the source and press Parse to build the tree outline. Selecting a row opens its Tag name, its Attributes and its Text for in-place editing rather than tag typing.

Rename tags, add or remove attributes, add child elements or text nodes, move nodes up and down, or delete them. The document panel re-serialises with two-space indentation after every change, so the output stays well-formed.

What to Expect

Best for

  • Renaming a tag across a small fragment without hand-editing brackets
  • Adding an attribute to one element in a nested document
  • Restructuring a fragment and reading the serialized result

Not ideal for

  • A large document, where the outline is harder to navigate than a text editor
  • Validating markup against a schema, which the parser does not do
  • Editing CSS or JavaScript, which the tree does not contain

What this tool keeps

  • The element hierarchy and every attribute value
  • The text of each node, exactly as it was in the source
  • A well-formed serialization with two-space indentation

What may need cleanup

  • Whitespace between block elements, which the re-serialization drops
  • The original indentation, which is replaced by two spaces
  • An unclosed tag, which the parser repairs on the next re-parse

Common errors

  • Reading the output panel as the file you imported, when it has already been normalised
  • Typing an unclosed tag in the source and expecting the tree to keep the previous state
  • Looking for a save or export button; the output is for copying

Example use cases

  • Renaming a wrapper element in a card fragment
  • Adding a class attribute to one nested element
  • Reordering two sections and copying the serialized result

Sample input

The default card fragment, a div holding an h2 and a paragraph with a strong run inside it.

Sample output

An outline with the div, the heading and the paragraph, and a serialized document indented by two spaces.

Who this is for

  • Developers editing a fragment without hand-matching tags
  • Anyone restructuring markup and wanting it well-formed
  • People learning how a document tree maps to markup

Frequently asked questions

How does the HTML editor work?

It parses your source into a tree, shows the tree as an outline, and lets you edit elements and text in place rather than editing tags by hand.

Does it validate markup against a schema?

No. The parser does not validate, and an unclosed tag is repaired on the next re-parse.

What happens to my original indentation?

Re-serialization replaces it with two-space indentation and drops whitespace between block elements.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.