Loading editor…

Tree /

Output initialises when this pane is visible.

Initialising…
0 B idle

How to use

Step-by-step guides for every mode — scroll down or jump here from the Help menu.

Quick start get going in seconds
  1. Paste or type XML in the left pane. The status bar shows whether the document is well-formed.
  2. Pick a mode from the centre rail: Tree, Format, Diff, Validate, XPath, Transform, or XSLT.
  3. Search with the top bar — matches highlight in the code editor and tree.
  4. Use the sidebar to import, export, copy, paste, or load from a URL. Your session is auto-saved in this browser only.

Everything runs 100% in your browser — nothing is uploaded.

Tree view explore & edit elements

Browse your XML as a collapsible tree. Click any node to select it — its path appears in the breadcrumb above the tree.

  • Expand / collapse — use the toolbar buttons or click the carets on nodes.
  • Edit inline — changes in the tree sync back to the code editor.
  • Search — parent nodes expand automatically so every match stays visible.
  • Copy path — copy the XPath-style path of the selected node.

Ctrl/⌘ + T

Format / Minify pretty-print or compact

The formatted view appears on the right with consistent indentation. Toggle Minify to collapse whitespace between tags into a single line.

  • Wrap — toggle word-wrap for long lines.
  • Apply — push the output back into the input pane.
  • Download / Copy — save or copy the result from the output toolbar.

Ctrl/⌘ + S  ·  minify: Ctrl/⌘ + Shift + M

Diff examples & when to use each option

Diff mode shows your input XML on side A (left) and a comparison document on side B (right). Monaco highlights added (green), removed (red), and changed lines so you can see what differs between two versions of a file.

What side A and side B mean

  • A · Input — starts as whatever is in your left editor (the document you are working on).
  • B · Comparison — the other file: an older export, API response, teammate copy, or golden reference. Paste it with the B toolbar or type it directly.

Both sides are editable. Changes on A flow back to the main input; changes on B are saved in your session for the next time you open Diff.

Getting a document onto side B

  • Paste — paste button on the B toolbar (fallback dialog if the browser blocks clipboard).
  • Swap — flip A and B; each side Sort / Ignore WS / Format settings move with the text.
  • Clear — empty B and start a new comparison.

Toolbar buttons (each side has its own)

These change how that side is shown in the diff. Your source text is kept separately; toggling options re-renders the view without losing the original unless you edit the pane itself.

Button Turn on when… Turn off when…
Sort Same elements, different sibling order (record lists, config items, repeated tags). Order is meaningful (workflow steps, log lines, playlist tracks).
Ignore WS One file minified, one pretty-printed; extra spaces/newlines inside text nodes. Whitespace inside <title>, <description>, etc. must match exactly.
Format You want indented XML on that side for readability. Use Minify for a single-line view instead.
Minify Compact view; often pairs with Ignore WS when comparing exports. Use Format when scanning nested structure visually.

Example 1 — Same data, books in different order

Typical with database exports or merged configs: identical <book> entries, shuffled.

Side A

<catalog>
  <book id="bk101"><title>Guide</title></book>
  <book id="bk102"><title>Rain</title></book>
</catalog>

Side B (reversed)

<catalog>
  <book id="bk102"><title>Rain</title></book>
  <book id="bk101"><title>Guide</title></book>
</catalog>
  • Sort ON (default) — siblings reordered before compare, usually no differences.
  • Sort OFF — diff shows blocks as moved because order is compared literally.

Example 2 — Pretty-printed vs minified (same semantics)

Side A (minified)

<root><item>OK</item></root>

Side B (formatted)

<root>
  <item>OK</item>
</root>
  • Ignore WS ON — ignores indentation-only line differences in the diff gutter.
  • Click Format on A or Minify on B so both panes look alike while you read.

Example 3 — Spaces inside text (signal vs noise)

<!-- A -->
<note>Hello   world</note>

<!-- B -->
<note>Hello world</note>
  • Ignore WS ON — may treat these as the same (whitespace collapsed in text nodes).
  • Ignore WS OFF — shows a text change when spaces matter (exact strings, encoded payloads).

Example 4 — Real structural change (Sort cannot hide this)

B adds a book and changes a price. Sort only reorders siblings; new tags and changed values still highlight.

<!-- A -->
<catalog>
  <book id="bk101"><price>44.95</price></book>
  <book id="bk102"><price>5.95</price></book>
</catalog>

<!-- B -->
<catalog>
  <book id="bk101"><price>39.99</price></book>
  <book id="bk102"><price>5.95</price></book>
  <book id="bk103"><price>12.00</price></book>
</catalog>

Expect highlights on 39.99 and the new bk103 block regardless of Sort.

Example 5 — Order matters (keep Sort off)

Processing pipelines where step sequence is significant:

<pipeline>
  <step>validate</step>
  <step>transform</step>
  <step>export</step>
</pipeline>

If B swaps transform and export, keep Sort OFF — you should see that reordering as a difference.

Recommended workflows by task

  • Are these two exports equivalent? — Sort ON, Ignore WS ON, paste B; any remaining highlight is a real mismatch.
  • What changed between v1 and v2? — Sort ON (if lists are unordered), Ignore WS ON; read red/green chunks for values and missing tags.
  • API returned fields in a different order only? — Sort OFF; if diff clears when you turn Sort ON, order was the only issue.
  • Before/after manual edit — copy backup to B, Format both sides, tune Ignore WS.
  • Audit log or ordered XML — Sort OFF on both sides from the start.

Step-by-step (first time)

  1. Load or paste your XML in the left editor.
  2. Press Ctrl/⌘+D or choose Diff from the rail.
  3. Paste the other file onto side B.
  4. Leave Sort and Ignore WS on; scan the diff.
  5. If red/green is mostly indentation, click Format on both sides.
  6. To inspect list reordering, turn Sort OFF temporarily.
  7. Use Swap to compare from the other direction.

Limitations: With Sort or Ignore WS enabled, XML is parsed in the browser. Comments and <?xml …?> may not appear in the diff pane. For comment-sensitive reviews, turn both Sort and Ignore WS off on that side; Format/Minify still work on raw text.

Ctrl/⌘ + D — open Diff mode

Validate well-formed XML & optional XSD

Checks that your input is well-formed XML. Errors appear in the status bar, as red markers in the editor, and in the validate pane when that mode is open.

  • Auto-fix — when offered, applies safe repairs (e.g. unclosed tags).
  • XSD — load an XML Schema file to validate structure and types against your document.
  • Validation runs as you type; switching away from Validate mode keeps markers on the input editor.

Ctrl/⌘ + E

XPath query & highlight nodes

Run XPath 1.0 expressions against your input. Matching nodes can be highlighted in the tree when you return to Tree mode.

  • Type an expression (e.g. /catalog/book/title) and run it.
  • Results appear in the output area; use them to verify structure before transforms or export.

Ctrl/⌘ + Shift + X

Transform XML → JSON, YAML, CSV, …

Convert the current input to another format. Choose the target from the dropdown and click Convert.

  • JSON — hierarchical JSON object.
  • YAML — human-readable block style.
  • CSV — tabular export (string cells quoted).
  • Markdown / HTML table — quick previews for docs or web.
  • Copy — use the overlay on the output editor to copy the result.

Ctrl/⌘ + Shift + R

XSLT playground stylesheet → output

Edit an XSLT stylesheet and run it against your input XML using the browser’s XSLTProcessor. Output type (XML, HTML, or text) is detected from the stylesheet.

  • Default sample stylesheet is loaded — replace it with your own.
  • Copy buttons on the stylesheet and output panes.

Ctrl/⌘ + Shift + L

Search find text in XML

Search the input editor and tree from the top bar. Use the arrow buttons or Enter / Shift+Enter to step through matches.

Ctrl/⌘ + F

File & clipboard import, export, paste
  • Import — open a .xml file or drag it onto the editor.
  • Export — download the current input.
  • From URL — fetch XML from a CORS-enabled URL.
  • Copy / Paste — system clipboard with a fallback dialog when blocked.
Keyboard shortcuts work faster
Ctrl/⌘ + T Tree mode
Ctrl/⌘ + S Format mode
Ctrl/⌘ + Shift + M Toggle minify
Ctrl/⌘ + D Diff mode
Ctrl/⌘ + E Validate mode
Ctrl/⌘ + Shift + X XPath mode
Ctrl/⌘ + Shift + R Transform mode
Ctrl/⌘ + Shift + L XSLT mode
Ctrl/⌘ + F Search

Features

Everything XML Editor Pro offers — processed locally in your browser.

Interactive tree view

Explore XML visually with expand/collapse, inline edits, and path breadcrumbs. Changes sync to the code editor instantly.

Format & minify

Pretty-print with 2-space indentation or minify to a single line. Output is editable; apply it back to the input or download as a file.

Smart XML diff

Compare two documents side by side with per-side Sort, Ignore WS, Format, and Minify. Ideal for configs, feeds, and exports that differ only in element order or whitespace.

Validation & XSD

Well-formedness checks with line-accurate errors, optional auto-fix, and XML Schema validation when you load an XSD.

XPath 1.0 studio

Query your document and inspect matches. Highlights can carry over to the tree view.

Transform & XSLT

Export to JSON, YAML, CSV, Markdown, or HTML; or run XSLT 1.0 stylesheets in a live playground with copyable output.

100% private, works offline

All parsing, diffing, XPath, transforms, and XSLT run in your browser. Nothing is uploaded. After the first load, no network is required except “Load from URL”.

Import, export & session restore

Open .xml files, drag-and-drop, fetch via URL, or paste from the clipboard. Your last session is restored from localStorage on return.

FAQ

Common questions about XML Editor Pro.

Is my XML data safe?

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.

Does it work offline?

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.

Can I compare two XML files with elements in a different order?

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.

Walkthrough: comparing two config exports step by step
  1. Paste your production config in the left editor.
  2. Press Ctrl/⌘+D to enter Diff — that becomes side A.
  3. Copy the staging export and click Paste on the B toolbar — that becomes side B.
  4. Confirm Sort and Ignore WS are active on both toolbars (blue).
  5. Scan for red/green lines. No highlights? The exports are equivalent for compare purposes.
  6. Still noisy from indentation? Click Format on A and B.
  7. See a difference in a list of items? Turn Sort OFF — if it disappears when you turn Sort back on, only order differed; if it stays, content or structure really changed.
Why do Sort or Ignore WS change what I see in the diff?

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.

Do comments survive diff normalization?

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.

Which XPath version is supported?

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.

What transform outputs are available?

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.

Other tools

Load XML from URL

The URL must allow CORS. Plain XML only.

Paste XML

Clipboard access denied. Paste your XML below.