Format and validate XML and SVG documents in your browser. Uses native DOMParser to pinpoint exact syntax error locations.
Offers customizable 2-space and 4-space hierarchical indentation, as well as single-line minification to reduce payload size.
Frequently asked questions
How does it detect XML errors?
It leverages the browser engine’s native XML parser, catching unclosed tags and invalid characters with high precision.
Can I format SVG files?
Yes, SVG is XML-compliant. You can format, clean, or compress SVG vector code here.
中文说明
在浏览器中实时校验与美化 XML、SVG 矢量图形与 RSS 数据。利用浏览器原生 DOMParser 快速定位语法错误位置。
支持 2 空格与 4 空格层级缩进,并支持一键去除多余空白和注释进行单行 Minify 压缩,大幅精简报文体积。
常见问题
它是如何发现 XML 语法错误的?
直接调用浏览器底层原生的 XML 解析引擎,能够精准捕获未闭合标签、非法字符等语法错误。
可以用来格式化 SVG 吗?
完全可以,SVG 本质上就是合法的 XML 格式,你可以随时用来美化或压缩 SVG 矢量图标代码。