Ordered XML and JSON converter

xml-ordered-v1 preserves the order of children and attributes, qualified names, namespace URIs, text, CDATA, comments and processing instructions.

  • Runs in your browser
  • No upload
  • Check before download

Inputs stay in this tab and are not uploaded or saved automatically. Optional aggregate usage counts and coarse processing diagnostics are sent only after consent, without input content or filenames. Clearing or closing loses inputs; save needed outputs first.

Formats and limits

xml-ordered-v1 preserves the order of children and attributes, qualified names, namespace URIs, text, CDATA, comments and processing instructions. XML entity spelling, quote style and empty-tag style may be normalized. JSON→XML checks the whole model by re-parsing; wrong namespaces or unsafe model nodes are rejected. No lossy attribute flattening and no guessing of mixed content. An XML declaration may leave out the encoding or declare UTF-8 (case-insensitive). Other encodings are rejected before the file is read or exported, and the output is always UTF-8.

UTF-8 only. Input up to 1 MiB; XML up to 100,000 UTF-16 units and depth 64; JSON up to 20,000 nodes. JSON Lines up to 16 MiB, 100,000 records and 1 MiB per value. Output up to 32 MiB. Queries run for up to 3 seconds and other jobs for up to 10 seconds in a worker you can cancel. XSD native memory is limited to 64 MiB; this is not the whole worker or DOM heap.

How to use it

  1. Choose the source and mode

    Choose XML→JSON to inspect the ordered model. For JSON→XML, supply this tool’s xml-ordered-v1 model, not an arbitrary object with attribute prefixes you made up.

  2. Configure the domain parameters

    For <r a="001">Hi</r>, the JSON contains model=xml-ordered-v1, an element named r, attribute a with the string value 001 and a text child Hi. Converting that model back gives the same element, attribute value and text.

  3. Inspect diagnostics and download

    When you edit the model, keep the ordered children and the namespace URI fields. Text, CDATA, comments and processing instructions stay separate. Download the JSON model or the rebuilt XML rather than flattening mixed content into a dictionary.

Formats and limits

Why is this input rejected or empty?

Wrong model names, unexpected fields, inconsistent namespace bindings and unsafe nodes are rejected. A valid generic JSON object is not enough: the reverse conversion parses it again and compares the complete XML model.

Which parser profile and limits apply?

The ordered XML information is kept, but not every original byte: entity spelling, quote style and the spelling of empty tags can be normalized. XML input is limited to 100000 characters. DTD and entity declarations and remote resolution are not supported.

Are inputs or referenced files sent to a server?

Parsing runs locally in a browser worker. URLs inside the input are not used to fetch remote documents. Supply any schema dependencies the tool supports as local files, keep your source file separately, and download the results before you close the page.