An online XML workbench with five operations: beautify with tabs or 2/3/4-space indentation, minify, validate with the line the parser stopped on, draw the document as a collapsible tree, and convert XML to JSON, XSD, DTD or class objects in 18 programming languages. Every operation runs in your browser, so the document you paste is never uploaded.
How to Use
Paste your XML, or open a file
Type or paste into the input box, or open a local .xml file from your machine. The file is read in the browser and never uploaded.
Pick an operation
Choose format, minify, tree view, validate or Data to Class. Format offers tabs or 2/3/4 spaces; Data to Class offers 22 targets, from JSON and XSD to class definitions in 18 languages.
Run it, then copy, print or save
Press the button to run the operation. The result appears on the right, where you can copy it, print it, or save it as a .xml file, a source file, or a PNG in tree view.
XML Format / Beautify
XML Minifier / Compactor
XML Validator (Check XML Syntax)
XML Tree View
Data to Class (Turn XML into Class Objects)
Other Features
Frequently Asked Questions
- Why does my XML fail validation when it looks correct?
- Well-formedness is strict. A single unclosed tag, a missing end tag, an unescaped ampersand or a bare angle bracket inside text will stop the parser. Attribute values must be quoted, even when they are numbers. The validator reports the line and column where parsing stopped, which is usually just after the real mistake.
- Is my XML uploaded to a server?
- No. Formatting, minifying, validating, tree rendering and every conversion run as JavaScript in your browser. The document never leaves your machine, so this tool is safe for configuration files and payloads that contain internal data.
- What is the tree view for?
- It draws the element hierarchy as a diagram instead of text. Deeply nested configuration or SOAP responses are much easier to read this way, and folding a branch lets you ignore everything except the subtree you care about. The diagram can be saved as a PNG, printed, or copied as an image.
- Can I generate a schema or a class from my XML?
- Yes. Data to Class reads the structure of your document and emits XSD, DTD, JSON Schema, or a class definition in one of 18 languages. Element names become class and field names, and nested elements become nested types. Treat the output as a first draft: naming conventions and nullability are guesses, and the Ruby, Dart and Haskell targets type every value as a string.
