XML Toolkit

Format XML, validate parser errors, run XPath, and convert XML documents to JSON or CSV without uploading payloads.

Local processingYour input stays in this browser tab.
Formatting

Format & compact

Beautify nested XML, minify whitespace, and control indentation before comparing payloads.

Transform

Convert

Switch between XML and JSON locally. Output highlighting follows the selected conversion.

Inspect

Query

Run XPath against the input document and send matched nodes to the output panel.

Workspace

Session

Load a safe sample, clear the workspace, or export the current output.

Input

Paste or type XML to format or convert

0 charactersLine 1, Col 1

Output

Formatted XML, CSV, or converted JSON

Validation: WaitingCtrl/⌘ Enter formats · Shift converts
Line 1, Col 1File size: 0 bytesValidation: WaitingOutput: XML
Browser-local reference

User guide

Use the guide as a quick checklist when formatting, converting, or debugging XML payloads.

1. Paste input

Paste XML for formatting, minification, XPath, or XML to JSON. Paste JSON when using JSON to XML.

2. Format or minify

Format XML adds readable indentation. Minify XML removes formatting whitespace for compact transport.

3. XML to JSON mapping

Attributes become @ properties, text nodes are preserved, and repeated sibling tags become arrays.

4. XML to CSV mapping

Repeated child elements become rows. Attributes and direct child text values become CSV columns with quoted cells.

5. Query with XPath

Try //ship for elements or //@id for attributes. Matching nodes render in the output editor.

6. Fix issues

Malformed XML appears in the Issues pane. Use Go to error to focus the exact line and column in the input editor.

How to use the XML Toolkit

Paste XML into the input panel, then choose Format XML for indentation, Convert to JSON for object data, or XML to CSV for repeated child records.

The output editor switches syntax mode between XML, JSON, and CSV-oriented plain text depending on the action.

XML conversion mapping rules

  • Attributes become properties prefixed with @, such as @id.
  • Text content is preserved as #text when an element also has attributes or child elements.
  • Repeated child tags become arrays automatically.
  • XML to CSV treats repeated children under the document root as rows, with attributes and direct child text values as columns.
  • Malformed XML is reported from the browser's native DOMParser parser error.

Client-side parsing

The toolkit uses new DOMParser().parseFromString(input, "application/xml") in the browser. PayloadHarbor does not send XML or converted JSON to a server.

What this XML Toolkit does

Use the XML Toolkit as an XML formatter, validator, converter, minifier, XPath tester, and XML to CSV helper. It is designed for API XML, SOAP-style payloads, data exchange files, and config snippets.

When developers use it

  • Beautify or minify XML while checking parser errors.
  • Convert XML to JSON, XML to CSV, or JSON back to XML for quick payload transformations.
  • Run XPath queries to inspect matching nodes and attributes.

Privacy, input, and output

XML parsing and conversion use browser-side APIs and local TypeScript helpers. PayloadHarbor does not upload XML documents.

Paste XML or compatible JSON depending on the action. The output editor switches between XML, JSON, or CSV highlighting based on the selected transformation.

Validation rules and limitations

  • Browser DOMParser validation checks well-formed XML; it does not validate against XSD schemas.
  • XML to CSV works best with repeated child elements under one root.