What minifying changes
Block mappings and sequences become { } and [ ]; literal and folded block scalars become double-quoted strings with escaped newlines; blank lines are removed. Anchors, aliases and explicit tags remain, so shared nodes stay shared.
Comments have no place in a one-line document, so they are removed and reported as a consent-required loss. Keep the original if you need them.
Minified YAML or JSON?
Minified YAML keeps YAML-only features — anchors, tags, timestamps, non-string keys — that JSON cannot represent. If a consumer needs JSON, use the YAML to JSON converter, which lists each loss.
Questions
- Is minified YAML still valid YAML?
- Yes. The output is re-parsed and compared to the source before it can be applied; if it does not parse or a value differs, the result is blocked.
- Are multi-document files supported?
- Yes. Each document is minified separately and the --- separators remain.