Validate and re-indent XML while preserving attributes and text content.
No comments yet. Be the first!
Validate and re-indent XML while preserving attributes and text content. It is parsed safely, with no external resources loaded.
No — attributes keep their original names, values, and order, and ordinary element text is preserved verbatim. Only the whitespace between elements is reformatted, to produce clear indentation.
Yes — input containing a SYSTEM or PUBLIC external entity/DTD declaration is explicitly rejected before parsing, and the browser's native XML parser never makes network requests to resolve external entities in the first place.
For content like "<p>Hello <b>world</b>!</p>" — text mixed with child elements — the tool does not reformat the inside, and preserves it exactly as written, to avoid accidentally changing meaningful whitespace through reindentation.
Formatting runs entirely in your browser — the source you paste or upload here is never sent to any server.