XML Converter

Convert XML to JSON, YAML, CSV, TSV, HTML, or text.

0 chars
0 words
0 lines
0 chars
0 words
0 lines

XML Converter Online

The XML converter is a single workspace for turning an XML document into whatever format the next step of your work needs. Paste the XML once, then switch between JSON, YAML, CSV, TSV, HTML table, and plain text to compare the results side by side — no need to hop between separate tools.

Hierarchical targets: JSON and YAML

Both keep the full structure of the document. Attributes become @name keys, element text next to attributes is stored under #text, and repeated elements are grouped into arrays. Type detection turns 44.95 and true into real numbers and booleans, while values like 007 stay strings.

Tabular targets: CSV, TSV, and HTML

Spreadsheets and HTML tables are flat, so the converter first finds the records in your document — the element that repeats most often — and turns each one into a row. Nested child elements are flattened into dotted column names, and a table preview below the editors shows the rows before you download them. The HTML table mode also renders a live preview of the generated markup.

Plain text

Sometimes you just want the words. Text mode extracts the text content of every element, or prints path: value lines that are easy to grep, or an indented outline that summarizes the document's shape.

Choosing the right target

Use JSON when the data goes to JavaScript or a REST API, YAML when humans will edit it as configuration, CSV or TSV for spreadsheets and database imports, the HTML table for publishing, and text when you need to search, count words, or feed the content to another text tool.

Tips

  • Documents without repeating elements produce a single-row table.
  • Turn off namespace stripping when two namespaces use the same local name.
  • The conversion runs in your browser, so internal exports never leave your machine.

Dedicated converters with more options: XML to JSON, XML to YAML, XML to CSV, XML to TSV, XML to HTML, XML to Text, and XML to Excel. Going the other way? Try JSON to XML.

Frequently Asked Questions

JSON, YAML, CSV, TSV, an HTML table, and plain text. Pick the target with the mode buttons above the editors; the options change to match the selected format.

The converter looks for the element that repeats most often — for example <book> inside <catalog> — and turns each occurrence into a row. Attributes and child elements become columns, and an attribute on a text element such as <price currency="USD"> becomes a separate price@currency column.

“Text content only” prints the text of each element on its own line. “Path: value lines” prefixes every value with its element path, like catalog.book.title, and includes attributes. “Indented outline” shows the element hierarchy with indentation.

With “Remove namespace prefixes” on, dc:creator becomes creator and xmlns declarations are dropped, which gives cleaner keys and column names. Turn it off to keep the qualified names.