$devtoolkit.sh/tools/yaml-minifier

YAML Minifier

Strip comments and blank lines from YAML to produce compact output.

$yaml input
0 chars1 lines
$minified yaml[READY]
0 chars1 lines

Related Tools

FAQ

What is removed during minification?
All lines that are purely comments (starting with #), all blank lines, and leading/trailing whitespace on each line are removed. Inline comments at the end of a value line are also stripped.
Is the output still valid YAML?
Yes — removing comments and blank lines does not affect YAML structure. The minified output is valid and parseable by any standard YAML library.
When would I minify YAML?
Common cases include embedding a config in a shell script or environment variable, reducing file size for network transfer, or cleaning up generated YAML that contains many auto-inserted comments.

Paste YAML and remove all comments (# ...), blank lines, and unnecessary whitespace while preserving the data structure. Useful for reducing config file size before embedding in environment variables or shell scripts.

/tools/yaml-minifierv1.0.0