Beautify or minify HTML in your browser: consistent indentation, inline elements kept together, tag-balance warnings. No upload, no signup.
Markup warnings
Elements0
Unique tags0
Max depth0
Attributes0
Comments0
Size (in → out)0 B
Content of script, style, textarea, title and pre is copied byte-for-byte — the formatter never rewrites code inside it.Unclosed, mismatched or stray tags are reported below the result; the formatter does not invent closing tags.
How to Format and Minify HTML
This HTML formatter turns cramped or badly indented markup into readable, consistently indented HTML. Paste your markup into the box, pick two spaces, four spaces or a tab, and the cleaned copy appears in the second box as you type; short elements whose content is only inline text, links, emphasis or images stay on one line, so a paragraph does not explode into dozens of fragments. The same page works in the other direction: switch to Minify and every run of whitespace between block tags disappears, while the single spaces that still matter between inline elements are kept. Blocks such as script, style, textarea, title and pre are copied byte-for-byte, because re-indenting code or preformatted text would change what the browser renders. Under the result the tool lists every unclosed, mismatched or stray tag it found, together with element, attribute and nesting-depth counts, so broken markup can be fixed instead of guessed at. Everything runs locally in your browser: nothing is uploaded, there is no signup, and the result can be copied or downloaded as an .html file.
HTML formatieren und minifizieren — so funktioniert es
Dieser HTML-Formatierer macht zusammengedrückten oder schlecht eingerückten Code wieder lesbar. Markup in das Feld einfügen, zwei Leerzeichen, vier Leerzeichen oder Tab wählen, und die aufgeräumte Fassung erscheint beim Tippen im zweiten Feld; kurze Elemente, deren Inhalt nur aus Text, Links, Hervorhebungen oder Bildern besteht, bleiben in einer Zeile, damit ein Absatz nicht in Dutzende Fragmente zerfällt. Dieselbe Seite arbeitet auch in die andere Richtung: im Modus Minifizieren verschwinden alle Leerraum-Läufe zwischen Block-Tags, während die einzelnen Leerzeichen zwischen Inline-Elementen erhalten bleiben, weil sie das Rendering beeinflussen. Inhalte von script, style, textarea, title und pre werden byte-genau übernommen, denn neu eingerückter Code oder vorformatierter Text würde im Browser anders aussehen. Unter dem Ergebnis listet das Tool jedes nicht geschlossene, falsch verschachtelte oder überzählige Tag auf, zusammen mit Element-, Attribut- und Verschachtelungszahlen. Alles läuft lokal im Browser: kein Upload, keine Anmeldung, und das Ergebnis lässt sich kopieren oder als .html-Datei herunterladen.