✅ YAML 校验器YAML Validator
在线校验 YAML 语法:准确指出出错的行号、列号并显示上下文,检查重复键和缩进错误,支持多文档,可查看解析后的 JSON 或规范化 YAML。Validate YAML syntax online: pinpoints the line and column with context, catches duplicate keys and bad indentation, supports multi-document files, and can show the parsed JSON or normalised YAML.
使用说明与常见问题How-to & FAQ
「YAML 校验器」是什么?What is the YAML Validator tool?
在线校验 YAML 语法:准确指出出错的行号、列号并显示上下文,检查重复键和缩进错误,支持多文档,可查看解析后的 JSON 或规范化 YAML。Validate YAML syntax online: pinpoints the line and column with context, catches duplicate keys and bad indentation, supports multi-document files, and can show the parsed JSON or normalised YAML.
如何使用「YAML 校验器」?How do I use the YAML Validator tool?
在「YAML 校验器」中,把内容粘贴或输入到上方输入框,按需设置「输出」,结果会实时显示在下方,点击「复制结果」即可复制。In the YAML Validator: Paste or type into the input box, adjust "Output"; the result appears below instantly — click "Copy result" to copy it.
会检查哪些错误?Which errors are caught?
所有语法错误(缩进不一致、冒号后缺空格、未闭合的引号或括号、Tab 缩进等)以及重复的键名;出错时显示行号、列号和出错位置附近的内容。All syntax errors (inconsistent indentation, missing space after a colon, unclosed quotes or brackets, tab indentation…) plus duplicate keys, with the line, column and surrounding context.
用的是什么解析器?Which parser is used?
js-yaml(MIT 许可),按 YAML 1.2 核心模式解析(另支持 << 合并键),支持多文档(--- 分隔)。核心模式下 2026-10-18 这样的日期、yes/no 都保持为字符串;.inf、.nan 是浮点数,JSON 无法表示时会以字符串输出并提示。它只检查语法,不校验 Kubernetes、Docker Compose 等特定格式的字段。js-yaml (MIT), parsing with the YAML 1.2 core schema (plus << merge keys) and supporting multiple documents separated by ---. Under the core schema dates such as 2026-10-18 and yes/no stay strings; .inf and .nan are floats and are shown as strings with a note when JSON cannot hold them. It checks syntax only, not schemas such as Kubernetes or Docker Compose fields.
数据会上传吗?Is my data uploaded?
不会,全部在浏览器本地处理。No — everything is processed locally in your browser.
「YAML 校验器」免费吗?需要注册吗?Is the YAML Validator free? Do I need an account?
「YAML 校验器」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The YAML Validator is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.