Config Validator

Validate and convert between JSON, YAML, and TOML formats

Valid JSON
Convert to:

About this tool

The YAML/TOML/JSON Validator checks your config files for syntax errors and converts between all three formats. Paste any config and instantly see if it is valid โ€” errors show the exact line and problem. Use the converter to transform between formats for different tools and frameworks.

When to use it

  • โ†’Validating CI/CD pipeline configs (GitHub Actions, GitLab CI) before pushing
  • โ†’Checking Kubernetes YAML manifests and Helm chart values files
  • โ†’Converting package.json configs to YAML for tools that require it
  • โ†’Debugging TOML config files for Rust projects, Hugo, and TOML-based tools

Tips

  • โ—†YAML is indent-sensitive โ€” tabs are invalid, use spaces. Mixing 2-space and 4-space indentation causes parser errors.
  • โ—†TOML keys are unquoted by default; quote them with double quotes only if they contain special characters.
  • โ—†JSON does not support comments, trailing commas, or single-quoted strings โ€” all common JSONC extensions that trip up validators.

Frequently asked questions

What is the difference between YAML and TOML?

YAML uses indentation for structure and supports complex nested data with minimal punctuation โ€” great for deeply nested configs like Kubernetes manifests. TOML uses explicit section headers ([section]) and key = value pairs โ€” closer to INI format and easier to understand at a glance for flat configs. TOML is preferred for Rust (Cargo.toml), Hugo, and pip. YAML dominates in CI/CD and container orchestration.

Why does YAML treat 'on', 'off', 'yes', 'no' as booleans?

YAML 1.1 (the version most parsers implement) treats on, off, yes, and no as boolean true/false in addition to true and false. This trips up Docker Compose and Ansible configs where you might legitimately use 'yes' or 'no' as string values. The fix is to quote them: 'yes', 'no'. YAML 1.2 removed this behavior, but parser support for 1.2 is inconsistent.

How do I add comments to config files?

YAML and TOML both use # for comments โ€” everything after # on a line is ignored. JSON does not support comments at all (it's in the spec). If you need comments in JSON-like files, use JSONC (JSON with Comments) supported by VS Code settings and tsconfig.json, or JSON5. Neither is valid JSON and they require a JSONC-aware parser.

What is TOML and what is it used for?

TOML (Tom's Obvious, Minimal Language) is a config format designed to be simple to parse and easy to read. It uses [section] headers and key = value pairs. It's the native format for Rust's Cargo.toml (package manifest), the Hugo static site generator, Python's pyproject.toml, and various other modern tools that favor explicit over implicit structure.

Related tools

๐Ÿฅท ToolNinja