Loading editor…
Output initialises when this pane is visible.
XML Studio
Pretty-print or minify XML in one click. All processing happens locally in your browser.
100% in your browsernothing is uploadedLoading editor…
Output initialises when this pane is visible.
Pretty-print or minify XML with readable indentation.
An XML formatter adds consistent indentation and line breaks to XML markup so elements, attributes, and namespaces are easy to read. Minified XML from logs or network traces is valid but painful to debug; formatting exposes hierarchy and mismatched tags quickly.
This tool also provides a tree view for browsing nodes and a minify mode when you need a compact single-line payload. When XML is not well-formed, click Auto-fix in the status bar to repair unclosed tags, bad attributes, and other common syntax issues. Everything runs locally — suitable for sensitive integration configs.
Pair formatting with validation when editing production XML. Our guide covers well-formedness and XSD checks.
Step-by-step guide for XML Formatter & Minifier. Everything runs locally in your browser.
When XML is not well-formed, an Auto-fix button appears in the status bar. It can repair unclosed tags, unquoted attributes, bare ampersands, broken comments, and mismatched closers.
Review the document after fixing — Auto-fix targets syntax, not XSD business rules.
Tree shows a collapsible hierarchy — click nodes to jump to the matching tag in the input. Format pretty-prints with indentation; toggle Minify in the output toolbar for a compact line.
Ctrl/⌘ + T tree · Ctrl/⌘ + S format · Ctrl/⌘ + Shift + M minify
Import a .xml file, paste from the clipboard, or use From URL when CORS allows. Sample documents are available under the sidebar samples menu.
Need tree view, schema validation, or other modes? Open XML Editor Pro for the full guide with Diff examples and workflows.
What this XML Formatter & Minifier page offers — processed locally in your browser.
Browse XML as a collapsible tree with path breadcrumbs and search.
Format XML with readable indentation and consistent line breaks.
Collapse whitespace between tags into a compact single-line payload.
One-click repair for unclosed tags, bad attributes, bare ampersands, and broken comments — appears in the status bar when XML fails to parse.
Push output back to the input pane, or copy and download instantly.
All processing runs in your browser. Nothing is uploaded.
Common questions about XML Formatter & Minifier.
Yes. Parsing, formatting, diffing, validation, XPath, transforms, and XSLT all run inside your browser.
Data is not sent to a server. The only local storage is your session in localStorage, which
you can clear in browser settings.
After the first visit (when Monaco and assets are cached), you can edit, format, diff, and transform without a network connection. “Load from URL” still needs network access and a CORS-friendly server.
Auto-fix handles many well-formedness problems: unclosed or mismatched tags, duplicate attributes,
unquoted attribute values, bare & in text, broken comments and CDATA sections, and orphan
closing tags. It appears in the status bar when parsing fails and inside Validate mode with per-error fix
buttons. Auto-fix does not change XSD-valid content — it only makes XML syntactically parseable so you can
continue editing or run schema validation.
Yes. Open Diff mode (Ctrl/⌘+D), paste the second file on side B, and keep Sort enabled on both sides. Sibling elements are reordered using a stable canonical ordering so equivalent documents align. Turn Sort off when sequence matters (e.g. ordered event lists).
Quick try: load the sample catalog, open Diff, paste the same XML on B but swap the two
<book> blocks. With Sort on, the diff should be empty; with Sort off, you will see the
blocks highlighted as changed lines.
Those options rebuild the view from your source text: Sort reorders elements; Ignore WS normalises whitespace in text nodes and tells the diff engine to ignore leading/trailing spaces on each line. Your stored source is kept separately so toggling options updates the display without losing the original unless you edit the diff pane itself.
When Sort or Ignore WS is on, the file is parsed with
DOMParser and comments are not preserved in the diff view. For comment-sensitive compares,
turn both off on that side — Format/Minify still work on the raw text.
XPath 1.0 (browser document.evaluate). Unprefixed names match local element names; the
sample catalog avoids a default namespace so paths like /catalog/book/title work as
expected.
JSON, YAML, CSV, Markdown, and HTML table. Pick a target in Transform mode and click Convert. Conversion uses the browser DOM — very large documents may take a moment.