FormatterHQ

XML Tools

Beautify, validate, minify, query, transform and convert XML documents, feeds and SOAP messages, directly in your browser.

Base64 to XML Decode a Base64 string back to XML with syntax highlighting. CSV to XML Converter Convert CSV to XML online for free. Attributes, arrays and root element are configurable. Excel to XML Converter Convert Excel to XML online for free. Attributes, arrays and root element are configurable. HTML Table to XML Converter Convert HTML to XML online for free. Attributes, arrays and root element are configurable. JSON to XML Converter Convert JSON to XML online for free. Attributes, arrays and root element are configurable. MXML Viewer View and format Adobe Flex / Apache Royale MXML files online with a component tree and neatly indented markup. OPML to JSON Converter Convert OPML to JSON online for free. Get formatted JSON with types detected automatically. OPML Viewer View OPML subscription lists and outlines as a clickable, nested list. Inspect feed URLs exported from any RSS reader. Random XML Generator Generate realistic fake XML test data — names, emails, addresses, dates and more — with custom fields. RSS Feed Viewer View RSS and Atom feeds as readable articles. Paste feed XML to preview titles, links, dates and summaries. RSS to JSON Converter Convert RSS to JSON online for free. Get formatted JSON with types detected automatically. SAML Response Decoder Decode Base64 or deflated SAMLResponse and SAMLRequest messages into readable XML and summarise issuer, NameID, conditions and attributes. SOAP Formatter Format SOAP request and response envelopes online. Beautify headers and body, validate the XML and pinpoint errors. Sort XML Online Sort XML elements alphabetically by tag name or by an attribute value, at every level. Optionally sort attributes as well. SQL to XML Converter Convert SQL to XML online for free. Attributes, arrays and root element are configurable. SVG Formatter Beautify SVG markup online so paths, groups and attributes are readable. WSDL Formatter Format WSDL files online. Beautify web service definitions with messages, port types, bindings and services neatly indented. XAML Beautifier Beautify XAML for WPF, UWP, WinUI, MAUI and Avalonia. Indent layouts, controls and bindings consistently and validate the markup. XML Converter Convert XML to JSON, YAML, CSV, TSV, HTML or plain text from one page. Attributes and repeated elements handled automatically. XML Diff - Compare XML Compare two XML documents after normalising indentation and line breaks, and highlight changed elements side by side. XML Editor Edit XML online with syntax highlighting, live validation and a tree preview. Format, minify and download your changes. XML Escape XML escape online: convert special characters into entities so text is safe inside XML. XML Formatter Format and beautify XML online with custom indentation. Validate structure, keep comments and CDATA, and spot errors by line. XML Minify Minify XML by removing indentation, line breaks and comments. Shrink SOAP payloads, sitemaps and configs while keeping them valid. XML Parser Parse XML online and inspect the resulting object tree with elements, attributes and text nodes clearly separated. XML Pretty Print Pretty print XML in the browser, with matching commands for xmllint, xmlstarlet, Python and .NET when it belongs in a script. XML Syntax Highlighter Highlight XML syntax online with coloured tags, attributes, values and comments. Copy the result as embeddable HTML. XML to Base64 Convert XML to a Base64 string online. UTF-8 safe; paste text or upload a .xml file. XML to C# Generate C# classes with JsonProperty attributes from a XML sample instantly, with nested types detected automatically. XML to C++ Generate C++ classes with nlohmann::json helpers from a XML sample instantly, with nested types detected automatically. XML to Crystal Generate Crystal classes with JSON mapping from a XML sample instantly, with nested types detected automatically. XML to CSV Converter Convert XML to CSV online for free. Nested data is flattened into columns. XML to Dart Generate Dart classes with fromJson and toJson from a XML sample instantly, with nested types detected automatically. XML to Elm Generate Elm type aliases with decoders from a XML sample instantly, with nested types detected automatically. XML to Excel Converter Convert XML to Excel online for free. Download a real .xlsx workbook generated in your browser. XML to Flow Generate Flow Flow type definitions from a XML sample instantly, with nested types detected automatically. XML to Go Generate Go structs with json tags from a XML sample instantly, with nested types detected automatically. XML to Haskell Generate Haskell records with Aeson instances from a XML sample instantly, with nested types detected automatically. XML to HTML Table Converter Convert XML to HTML online for free. Get clean table markup with a live preview. XML to Java Generate Java POJO classes with getters and setters from a XML sample instantly, with nested types detected automatically. XML to JavaScript PropTypes Generate JavaScript PropTypes React PropTypes definitions from a XML sample instantly, with nested types detected automatically. XML to JSON Converter Convert XML to JSON online for free. Get formatted JSON with types detected automatically. XML to JSON Schema Generate JSON Schema a JSON Schema document from a XML sample instantly, with nested types detected automatically. XML to Kotlin Generate Kotlin data classes from a XML sample instantly, with nested types detected automatically. XML to Objective-C Generate Objective-C classes with properties from a XML sample instantly, with nested types detected automatically. XML to PHP Generate PHP classes with typed properties from a XML sample instantly, with nested types detected automatically. XML to Pike Generate Pike classes from a XML sample instantly, with nested types detected automatically. XML to Python Generate Python dataclasses with type hints from a XML sample instantly, with nested types detected automatically. XML to Ruby Generate Ruby Dry::Struct classes from a XML sample instantly, with nested types detected automatically. XML to Rust Generate Rust structs with Serde derives from a XML sample instantly, with nested types detected automatically. XML to Scala Generate Scala case classes from a XML sample instantly, with nested types detected automatically. XML to String Converter Convert XML to an escaped string literal for Java, C#, JavaScript or JSON. Minify first or keep lines as concatenated strings. XML to Swift Generate Swift Codable structs from a XML sample instantly, with nested types detected automatically. XML to Text Converter Convert XML to Text online for free. Readable key: value output for reports and tickets. XML to TSV Converter Convert XML to TSV online for free. Paste the result straight into a spreadsheet. XML to TypeScript Generate TypeScript interfaces from a XML sample instantly, with nested types detected automatically. XML to YAML Converter Convert XML to YAML online for free. Clean, readable YAML with configurable indentation. XML Unescape XML unescape online: turn entities back into readable plain text instantly. XML URL Decode Decode a URL-encoded XML string back into readable XML. XML URL Encode URL-encode XML so it can be sent as a query-string parameter or form field without breaking the URL. XML Validator Validate XML online for well-formedness. Find unclosed tags, bad nesting and invalid characters with exact line and column numbers. XML Viewer View XML as a collapsible tree alongside formatted text. Inspect elements, attributes and values in any XML document. XML XSL Transform Apply an XSLT stylesheet to XML online and preview the result. Produce HTML, XML or text output from any XML document. XPath Tester Test XPath expressions online against your XML. See matched nodes, attributes, strings, numbers or booleans instantly. YAML to XML Converter Convert YAML to XML online for free. Attributes, arrays and root element are configurable.

XML tools for configs, feeds and enterprise data

XML remains the backbone of many systems: Maven and .NET project files, Android layouts, SOAP web services, RSS feeds, sitemaps, office document formats and countless enterprise integrations. XML is strict (one unclosed tag breaks the whole document) and verbose, so good tooling makes a real difference. These XML tools help you read, check, query, transform and convert XML without installing an IDE.

Choosing the right XML tool

  • Make XML readable – the XML formatter indents nested elements consistently; the XML viewer adds a collapsible tree for large documents.
  • Check well-formedness – the XML validator pinpoints mismatched tags, unescaped ampersands and other errors by line.
  • Shrink it – XML minify removes whitespace between elements for transport.
  • Find nodes – the XPath tester evaluates expressions such as //book[price > 30]/title.
  • Transform – XSLT transform applies a stylesheet to turn XML into HTML, text or another XML schema.
  • Compare – XML diff normalizes formatting and attribute order before comparing, so only real changes remain.
  • Convert – XML to JSON is the usual bridge to modern APIs; XML to CSV flattens repeating records into rows.

Specialized formatters exist for SOAP envelopes, WSDL files and XAML, and viewers for RSS and OPML feeds, so each dialect is displayed in a way that makes sense for it.

Typical workflows

Debugging a SOAP or partner integration: format the message, validate it, then use XPath to confirm the values your code expects are present. When a partner changes their payload, XML diff shows exactly what moved.

Migrating to JSON: convert a sample with XML to JSON and check how attributes and repeated elements are mapped, because XML has no direct equivalent of JSON arrays. Then generate typed classes with the XML to class generators if you need them in code.

Working with feeds and sitemaps

RSS feeds, OPML subscription lists and XML sitemaps are XML too. The RSS and OPML viewers present them as readable lists, while the validator catches the encoding and escaping mistakes that make feed readers and search engines reject a file. When a feed suddenly stops updating in readers, validating it is the quickest first check.

XML tips

  • Escape & as &amp; and < as &lt; inside text; the XML escape tool does it for you.
  • Well-formed is not the same as schema-valid: a document can be perfectly formed and still miss elements your schema requires.
  • Namespaces matter in XPath. If a query returns nothing, check whether the elements live in a default namespace.
  • Processing happens in your browser, which suits internal configuration and customer data.

Frequently asked questions

What is the difference between well-formed and valid XML?
Well-formed XML follows the basic syntax rules: one root element, properly nested and closed tags, quoted attributes and escaped special characters. Valid XML additionally matches a schema or DTD that defines which elements are allowed.
How do I convert XML to JSON?
Use the XML to JSON converter. Elements become objects, repeated elements become arrays and attributes are mapped to prefixed keys, so review the result for your use case.
Why does my XPath query return nothing?
The most common cause is a default namespace on the document. Elements in a namespace need a matching prefix in the query, or a namespace-agnostic expression.
Can I transform XML with XSLT online?
Yes. The XSL transform tool applies an XSLT stylesheet to your XML in the browser and shows the output.