XML formatter for VS Code that changes only the whitespace between tags, with XPath 1.0 on the file's own namespaces and a Copy XPath that selects the element under the cursor. Free, no sign-in, works offline.
Open an XML file and press Shift+Alt+F (Shift+Option+F on a Mac). If you have more than one XML formatter, VS Code asks which one to use.
Click the search button in the editor title to run an XPath, or click the XPath in the status bar to copy it.
ZOVO PRO AVAILABLEOne-time purchase · No subscription
Add Pro tools to XML Formatter & XPath Tools
Run XPath on a folder. Runs one XPath expression on every XML file in a folder and opens the matches as CSV, JSON or a Markdown report.
Format all XML files in a folder. Checks every XML file in a folder with the safe formatter, shows how many would change, then formats them or writes a Markdown report.
Compare XML ignoring formatting. Compares two XML files with indentation, line breaks, attribute order, quotes and empty-tag style ignored so only real changes show.
Format Document, Format Selection, Minify XML, XPath 1.0 with results and line numbers, Copy XPath at the cursor in three styles, the XML Tree view and well-formedness errors in Problems, with no sign-in. Formatting changes only the whitespace between tags.
What does Zovo Pro add?
Three tools, each with 3 free tries on your computer: Run XPath on Every XML File in a Folder (results as CSV, JSON or a Markdown report), Format All XML Files in a Folder, and Compare Two XML Files Ignoring Formatting (and attribute order). A try counts only when the tool gives you a result. They are in the Command Palette, the Explorer right-click menu ("Zovo Pro: ...") and at the end of XPath Results. Zovo Pro is USD 19 once for every Zovo extension; run "Zovo Pro: Get Zovo Pro" to pay or enter a key.
How large a file can it handle?
The tree, XPath and checks run on files up to 60 MB (setting xmlXpathTools.maxFileMB). In the tests a 49 MB file with about 1 million elements formatted in 1.6 seconds. VS Code does not pass files over 50 MB to extensions; right-click one in the Explorer and pick "Format Large XML File on Disk" (UTF-8, UTF-16 with a byte order mark and ISO-8859-1), but the tree and XPath do not run on it.
Does it validate against an XSD or support XPath 2.0?
No. It checks that a file is well formed, but does not validate against an XSD or a DTD. XPath is version 1.0 only, with no XPath 2.0 or 3.1, XQuery or XSLT.
Is it safe with untrusted XML?
Yes. It has no network code (a test checks that no HTTP or socket module is loaded). Entities are never expanded and DTDs are never loaded, so an entity bomb is measured, not expanded, and an external entity such as file:///etc/passwd is not read.
Marketplace README snippet (copy link for VS Code Marketplace)
See full docs & install options at [vscode.zovo.one/extensions/zovo-xml-xpath-tools/](https://vscode.zovo.one/extensions/zovo-xml-xpath-tools/), browse all Zovo VS Code extensions at [vscode.zovo.one](https://vscode.zovo.one/), or explore [Zovo Pro](https://vscode.zovo.one/pro/).
Auto rename tag and auto close tag as you type in HTML, JSX/TSX, Vue, Svelte, PHP, Blade, Twig, XML and Markdown. One undo step for both tags, never pairs <br> or TypeScript generics, highlights the matching tag. Free, no sign-in, works offline.
Run C++ and C code with one click: compile and run the current file with gcc, g++, clang or clang++. Interactive input in the terminal, an Input panel with saved test cases and diffs, errors in Problems, Stop for endless loops, per-file flags. Free, no sign-in, works offline. Zovo Pro adds a sanitiz
JavaScript playground and TypeScript scratchpad for VS Code: the value of each line shows at the end of the line as you type, with console.log output and errors on their own lines. A live JS and TS runner for quick tests and a REPL-style scratch file, with no tsconfig, no setup and no sign-in. Free,
Free and offline. CSS class names and id completion in HTML, React, Vue, Svelte, Angular, PHP and Blade, from every CSS, SCSS and Less file in your project, <style> blocks, linked style sheets and CSS modules. Go to definition and hover. Light on CPU in big monorepos.
Free HTML preview and HTML viewer beside your editor. Linked CSS, JS and images load, it updates as you type, and nothing is sent anywhere. No sign-in, no server, works offline. Zovo Pro adds save as one file, an accessibility and SEO check and a folder link check.
XSD viewer for VS Code: open XML Schema (.xsd) files and the schemas in .wsdl files as a tree and a diagram, with imports and includes resolved across the workspace, search and jump to line. Offline, no account.