The YAML Minifier strips comments, blank lines, and trailing whitespace from a YAML file to shrink it, while preserving the indentation that YAML relies on to define its structure. Paste your config or data file and get back a more compact version that still parses to the same values โ unlike JSON or XML, YAML can't be collapsed to a single line, since indentation itself carries meaning. It runs entirely in your browser.
Made for developers. Typical uses:
Explore more in Minifiers, read the guides and articles, or see how we test our tools.
Format and beautify YAML files with proper indentation.
Best for fixing indentation in a docker-compose.yml before it fails to parse
Minify and compress JSON data to reduce file size.
Best for reducing API response payload sizes
Minify XML data by removing whitespace and comments.
Best for shrinking an XML API response before storing it in a database column
Minify and compress CSS stylesheets to reduce file size.
Best for shrinking a stylesheet before deploying it to a production website to reduce load time
Compress PHP, Ruby, or SQL code by stripping blank lines and extra whitespace.
Best for compressing a PHP script before deployment to reduce file size