Loading…
Loading…
Format and validate YAML (docker-compose, Kubernetes, GitHub Actions) without losing comments, or convert YAML to JSON. Errors show the exact line and column.
Output appears here as you type.
docker-compose files, Kubernetes manifests, GitHub Actions workflows, Helm values, OpenAPI specs: paste one, drop or upload a .yml file, or load it from a URL. Click Sample for a docker-compose stack.
Formatted YAML re-indents with 2 or 4 spaces and keeps your comments. Collections can stay as written, or be converted to all block style or all flow style. JSON gives the same data as JSON for APIs and tools that don't read YAML.
Bad indentation, duplicate keys, unclosed quotes and brackets, and tabs used for indentation are reported with the line and column. Click to jump there. The output updates as soon as the YAML is valid again.
Copy it or download it as .yaml or .json. Multi-document files (separated by ---) are fully supported; for JSON they become an array with one item per document.
Yes. Comments, anchors (&name) and aliases (*name), tags like !Ref, quoting style, block scalars (| and >), and --- document separators all survive formatting. Numbers and constants are written exactly as you typed them (0x1F, 007, .5, True), even though the parser treats them as values. Only JSON output drops comments, because JSON has no way to represent them.
It doesn't here. This tool follows YAML 1.2, where only true and false are booleans, so NO, yes, and on stay strings (the "Norway problem" came from YAML 1.1). Watch out anyway if your YAML is read by an older 1.1 parser, such as PyYAML's default loader: quote values like "NO" or "on" to be safe. Existing quotes are always kept.
No. Parsing and formatting run in your browser, so manifests with secrets, connection strings, or internal hostnames never leave your machine.
The YAML spec requires keys in a mapping to be unique. Many parsers silently keep the last value, which hides bugs like two env: blocks where only one takes effect. The error shows you where the duplicate is.
A few YAML features have no JSON equivalent. An alias can refer to its own ancestor (a: &x [*x]), creating a loop JSON can't express. Anchors can also expand exponentially (the "billion laughs" attack), so conversion stops past a safe limit. Values like .inf and .nan become null, and the tool tells you when that happens.
Data
Format, validate, and minify JSON in your browser. Paste it, upload a file, or load it from a URL. Errors show the exact line and column.
C# / .NET
Paste JSON and get C# model classes or records, ready for System.Text.Json or Newtonsoft.Json. Nested objects, arrays, nullable types, dates, and GUIDs are inferred for you.
SQL
Format and beautify SQL queries for SQL Server (T-SQL), PostgreSQL, MySQL, Oracle, and more. Set the indentation, keyword case, and layout, and get the exact line of any syntax error.
Data
Format, validate, and minify XML (config files, .csproj, SOAP, RSS) in your browser. Entities, CDATA, and mixed content are kept exactly as written, and errors show the line and column.
Web
Beautify HTML pages and fragments without changing how they render. Inline spacing, <pre>, and scripts stay intact, and embedded CSS and JavaScript can be formatted too.
Images · SVG
Preview SVG code live and safely, check its size and viewBox, fix common errors, and export it as PNG, a data URI, a CSS background, or an <img> tag.