WebToolsForAll

Tools / Formatters & Beautifiers

XML parser and serializer

Parse and reserialize bounded XML while retaining mixed-text order.

Input

0 UTF-16 code units

Optional local draft

Saving stores a plaintext draft in this browser on this device. Do not save secrets or use this on a shared device. Nothing is saved or loaded automatically. Reset does not delete a saved draft; use Delete local draft.

No draft has been loaded.

Import a local text file

Output

Work through the task

Parse and reserialize bounded XML while retaining mixed-text order.

  1. Enter XML with one root and run the parser/serializer.
  2. Inspect mixed text and attributes before replacing the source. XML normalization can change declaration or quote spelling.
  3. Review the result before copying or downloading. Editing an input invalidates the previous result; keep an original if the transformation matters.

Example to check

<r>before <b>bold</b> after</r> keeps the text order “before bold after”.

Limits and output behavior

Source is limited to 100,000 characters. JSON/YAML/TOML have 10,000 values and 40 data levels; XML has separate node/attribute and element-depth guards. Comments, numeric spelling and other lexical formatting may normalize. YAML aliases/custom tags and TOML null values are unsupported. DTD/custom entities and external resources are rejected. This is not XSD, SOAP or application-schema validation.

Troubleshooting

Fix the reported tag/namespace error and keep a single XML1.0 root. DTD/custom-entity or unsupported byte-encoding assumptions cannot be repaired by indentation.

Questions

Why does mixed text keep its existing spacing?

This parser/serializer preserves decoded text order and meaningful whitespace. It does not insert new indentation into mixed text or perform XML canonicalization.

Input and privacy

Processing runs in this browser. Inputs are not saved automatically. An explicitly chosen local draft, where offered, is plaintext storage on this device. Downloaded files, clipboard contents and browser extensions have separate retention behavior.