Diese Seite ist noch nicht auf Deutsch verfügbar, daher zeigen wir die englische Version.

XML Formatter & Validator — Beautify XML Online

Turn minified or messy XML into clean, indented markup and check that it is well-formed — for feeds, sitemaps, SOAP messages, configs and SVG.

Aktualisiert am
Open file
Indent

Deine Daten verlassen nie deinen Computer. Die Verarbeitung erfolgt zu 100 % lokal im Browser.

So nutzt du: XML Formatter

  1. Paste XML or open a file such as .xml, .rss, .svg or .plist.
  2. Choose 2 spaces, 4 spaces or tabs for indentation.
  3. If the XML is not well-formed, the error and line number are shown.
  4. Copy or download the formatted result.

What is an XML formatter?

An XML formatter (or pretty-printer) re-indents a document so every element starts on its own line and nesting is visible at a glance. It is the fastest way to read an API response, a minified feed, a generated sitemap or a configuration file that arrived as one long line.

<catalog><product id="KB-001"><name>Keyboard</name></product></catalog>

becomes

<catalog>
  <product id="KB-001">
    <name>Keyboard</name>
  </product>
</catalog>

Well-formedness check

Before formatting, the document is parsed with the browser’s XML parser. Well-formed XML must follow a few strict rules — breaking any of them produces an error with the line number:

  • Exactly one root element.
  • Every start tag has a matching end tag, or is self-closing (<br/>), and tags nest properly.
  • Attribute values are quoted, and no attribute appears twice on one element.
  • & and < in text are escaped as &amp; and &lt; (or placed in CDATA).
  • Element names are case-sensitive: <Item> is not closed by </item>.

Validation against a schema (XSD, DTD) is a separate step that checks which elements are allowed; well-formedness is the prerequisite for it.

Formatting rules

Elements that contain only text stay on one line (<price>89.99</price>), empty elements are kept compact, and CDATA sections and processing instructions are preserved unchanged. Need the opposite? The XML minifier removes the indentation again. Working with JSON instead? Use the JSON formatter.

Auch gesucht als: beautify xml, xml pretty print, xml validator, format xml online, xml viewer, indent xml.

Passende Tools zu: XML Formatter

  • HTML Formatter — Paste minified or messy markup and get clean, consistently indented HTML — including embedded <style> and <script> blocks.
  • Sitemap Validator — Find and validate your XML sitemap — URL count, sitemap index children, lastmod coverage, duplicates and foreign-host URLs — and check that the pages it lists really return 200.
  • SVG Optimizer — Clean up SVGs exported from Figma, Illustrator, Inkscape or Sketch with SVGO — and check the before/after preview to make sure the icon still looks right.
  • CSS Formatter — Turn a minified stylesheet into readable CSS with one property per line and properly nested @media blocks.

Häufige Fragen

How do I validate XML online?
Paste it above. If the document is not well-formed, the parser error and its line number are shown; otherwise the formatted XML appears.
Does formatting change my data?
Only whitespace between tags changes. Text inside elements, attribute values and CDATA sections are kept as they are.
Can it format SVG and RSS?
Yes. SVG, RSS, Atom, sitemaps, SOAP, plist and other XML-based formats all work.
Is my XML sent to a server?
No. Parsing and formatting run in your browser.
Kann ich XML Formatter als Web-App installieren und offline nutzen?
Ja. XML Formatter ist eine installierbare Web-App (PWA) – sie wird über Ihren Browser installiert und nicht aus einem App-Store heruntergeladen. Klicken Sie oben auf dieser Seite in Chrome oder Edge (Windows, macOS, Linux, ChromeOS) auf „App installieren“ oder verwenden Sie auf Android-Geräten „Teilen“ → „Zum Startbildschirm hinzufügen“ auf dem iPhone und iPad bzw. „Datei“ → „Zum Dock hinzufügen“ in Safari 17+ auf einem Mac. Die App öffnet sich dann in einem eigenen Fenster mit einem eigenen Symbol, und da sie vollständig in Ihrem Browser ausgeführt wird, funktioniert sie auch offline. Firefox auf dem Desktop kann keine Web-Apps installieren. So funktioniert die Installation.

Ähnliche Tools