Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

XML Formatter for VS Code

Format XML the way you’d paste into VS Code: pretty print with configurable indentation, minify, and validate. Fast, offline, and safe for large XML snippets.

Input XMLTip: paste what you’d format in VS Code
OutputRead-only

If you need a broader XML tool, try the related format/validate tools below.

Privacy: runs locally in your browser. No uploads, no tracking scripts.

How to use

Use it like a quick VS Code formatting preview:

  1. Paste your XML into the input box.
  2. Choose indentation (spaces/tabs), line endings, and whether to collapse empty tags.
  3. Click Pretty Format or Minify. Use Validate to check syntax only.
  4. Copy the output back into VS Code.

FAQ

How is this related to formatting XML in VS Code?

It generates clean, consistent indentation and line breaks so you can paste the result into VS Code and get predictable diffs.

Does this validate XML or just reformat it?

Both: Validate checks syntax, and Pretty Format/Minify will fail with an error if the XML is invalid.

Will minify remove meaningful whitespace inside text nodes?

No—minify only removes whitespace between tags; it does not trim text content unless you enable Trim text nodes in pretty formatting.

Can I use tabs instead of spaces like my VS Code settings?

Yes. Enable Use tabs, or set the indent size (commonly 2 or 4 spaces).

Does it keep XML comments?

By default yes. Turn off Keep comments if you want them removed during pretty formatting.

Can it add an XML declaration like <?xml version="1.0"?>

Yes—enable Add XML declaration. Browsers often omit it when serializing, so this option forces it.

Is my XML uploaded anywhere?

No. The formatting and validation run locally in your browser, with no network requests.

Continue your workflow

Browse related tools by task. Use the improved core tools for a consistent workspace with file import, downloads and clear validation errors.

XML syntax · pretty/minify · declaration handling

Additional controls for this task, preserved from the original implementation. Inputs stay inside this mode.

XML well-formedness · pretty/minify · prolog handling

Additional controls for this task, preserved from the original implementation. Inputs stay inside this mode.