YAML Formatter
YAML is unforgiving about indentation, and you usually find out only when a pipeline fails or a container refuses to start. This tool checks the three mistakes that occur most often in practice. First, tabs: YAML permits spaces only for indentation, and a tab your editor inserted invisibly makes the file invalid — you get the line number. Second, duplicate keys within the same block: accepted by some parsers, which then silently take the last value, producing one of the nastiest classes of bug. Third, lines that cannot be read as a key-value pair, a list item or a comment. What you get back is your YAML with normalised indentation. This is a targeted check rather than a full YAML parser: advanced constructs such as anchors, references and multiple documents in one file are not fully unpicked. Everything happens locally in your browser — your configuration never reaches our server, is never logged and never stored, so a file with real hostnames is fine to paste here. Free and unlimited to use, including commercially — no account, no licence, no limits.
What people use this for
service: name: api port: 8080Tab in the indentation → message naming the line numberSame key twice in one block → message naming the key
What others think of this tool
No reviews for this tool yet. Yours would be the first.
Do you work with Westcube?
Leave a review on Google tooFrequently asked questions
Why are tabs not allowed in YAML?
The YAML specification forbids tabs for indentation, for a good reason: the width of a tab is undefined. One editor shows it as four positions, another as eight, so a parser could not reliably determine which level a line belongs to. The awkward part is that the problem is invisible — the line looks correctly aligned. Turn on "show whitespace" in your editor, or have it convert tabs to spaces automatically in yml and yaml files.
Why does the tool warn about duplicate keys?
Because the behaviour is unpredictable and the consequence is silent. The YAML specification calls a duplicate key within the same block invalid, but many parsers accept it anyway and then take the last value. So your file works, just not the way you think: the setting you carefully placed at the top is overwritten further down. This happens especially in long files and after a merge conflict resolved the wrong way.
Is this a full YAML parser?
No, and that is deliberate. The tool targets the mistakes that cost the most time in practice: tabs, duplicate keys and lines with no valid shape. Advanced YAML constructs — anchors and references, multiple documents separated by three dashes, block scalars preserving line breaks, explicit type tags — are not fully unpicked. For most configuration files that is more than enough. If you do use those constructs, verify with the parser of whatever the file is ultimately fed to.
Why has my indentation changed in the output?
The output normalises indentation so each level is consistent. If your source mixed two and four spaces, or contained a tab, one consistent style comes back. The structure stays the same; only whitespace changes. If you notice the structure changing too, the original indentation was ambiguous — and your pipeline’s parser was probably already reading it differently from what you intended.