XML Formatter

Format, minify, and validate XML — for SOAP responses, JUnit reports, and config files.

Runs 100% client-side
Copy output
On this page4 sections
Input
Output
Output will appear here…

HOW TO USE

  1. 01Paste XML into the input — try the sample for a JUnit-style snippet.
  2. 02Format indents based on tag nesting; Minify strips whitespace between tags.
  3. 03Validate uses the browser's DOMParser to check well-formedness.

WHEN TO USE

Use this when working with SOAP API requests and responses, JUnit/Surefire test reports, Ant build files, Android resource files, or any XML-based config that needs to be read or reviewed. SOAP payloads in particular arrive as dense single-line blobs — formatting makes element nesting and attribute values readable before you write XPath assertions or file a bug. Use Validate before sending a hand-crafted SOAP envelope to rule out well-formedness errors first.

WHAT BUGS THIS FINDS

  • Unclosed or mismatched tags

    A hand-edited SOAP request or fixture file with a missing closing tag fails at runtime with a parser error — Validate catches it before the request leaves your machine.

  • Namespace prefix mismatch

    An XPath assertion uses prefix 'ns1:' but the document uses 'soap:' — formatted output makes namespace declarations and prefixes visible across the full tree.

  • Whitespace-sensitive content

    A CDATA section or text node contains significant whitespace that Minify inadvertently strips — formatting reveals the original structure so you can protect those sections.

  • Encoding declaration conflicts

    A UTF-8 document with a Latin-1 encoding declaration produces parse errors in some consumers — Validate flags the declaration mismatch immediately.

QA USE CASES

01

SOAP request/response review

Format a raw SOAP envelope before writing XPath assertions on response nodes, making namespace prefixes and element depth easy to verify.

02

JUnit report inspection

Paste a JUnit XML report, format it, and confirm that test suite names, classnames, and failure messages are structured as your CI parser expects.

03

Android/iOS resource file audit

Format string resource XMLs to confirm key naming conventions and ensure no duplicate or missing entries before a localization release.