Workspace / XML Formatter

CODE TOOLKIT

XML Formatter

Inspect tags and structure in a readable document view.

Ctrl + Enter to process
Input No file
0 lines · 0 characters · 0 BLn 1, Col 1
Output Not processed
0 lines · 0 characters · 0 B
Ready to work.
No changes yet

Formatting organizes presentation with a parser. Your code is not executed.

PRACTICAL GUIDE

What this tool does

XML describes data using tags, attributes and text content. It is used in interchange documents, configurations and sitemaps. This tool checks syntactic structure and applies indentation. The formatter respects mixed content to limit changes to text containing inline tags within a sentence.

How to use it

  1. Import an .xml file or paste the complete document.
  2. Use Validate to inspect tags and attributes without reformatting.
  3. If it is valid, choose Format and the desired indentation.
  4. Check the result in the system consuming the XML, especially if whitespace matters.

Recommendations before downloading

  • XML is case-sensitive. Opening and closing tags must match.
  • Validation here does not check XSD, DTD or business rules.
  • External entities are not fetched. Documents containing DOCTYPE are not supported by this tool.

Frequently asked questions

Will a sitemap validated here be accepted by Google?

XML syntax is only one part. The sitemap must also comply with its protocol and be accessible over HTTP to the search engine.

Why is there no XML minification?

Whitespace can be part of the content. This tool prioritizes validation and formatting rather than broadly removing text.

Documentation for further reading

W3C XML specification