Minify YAML strips comments and blank lines from your YAML to create a smaller, cleaner version. Paste, minify, and export instantly.
How to Use:
- Paste your YAML into the input box or import a
.yaml
,.yml
, or.txt
file - Toggle Remove comments to strip full-line and inline comments (
#
) - Toggle Remove blank lines to delete all empty or whitespace-only lines
- The output updates live as you type or change any options
- Click Minify to regenerate the minified YAML manually
- Click Copy Output to copy the result to your clipboard
- Click Export to File to save the minified YAML as a file
- Enable Maximize output if you want a taller preview area
- Use Clear All to reset the input, output, file name, and all toggles
What Minify YAML can do:
This tool reduces YAML file size by removing unnecessary whitespace and comments. It’s ideal when you want a smaller file for transport, storage, or comparison. You can trim full-line comments or inline # remarks and strip out blank lines that don’t affect functionality. The result is still valid YAML just leaner and cleaner. Everything runs locally in your browser, so no YAML leaves your device. Whether you’re cleaning config files or preparing compact test data, it’s fast, safe, and flexible. You can also toggle options individually to control exactly how aggressive the cleanup should be.
Example:
Input:
# User data
name: Alice
age: 30 # age in years
# Location
city: London
Minified Output:
name: Alice
age: 30
city: London
Common Use Cases:
Minify YAML works great for cleaning up files before deployment, diffing configuration changes, or sharing only what matters. You can slim down YAML for use in scripts, version control, or when sending configs through APIs, forms, or storage systems that prefer compact data.
Useful Tools & Suggestions:
After minifying YAML, it’s worth running Validate YAML to make sure nothing got scrambled. And if you need to send or embed it somewhere, Base64-encode YAML wraps it up into a compact, transport-friendly string.