YAML Tools
YAML Comment Stripper
Remove comments from YAML while keeping quoted strings intact.
Loading tool…
What is Strip Comments?
A comment remover for YAML configs: full-line and trailing # comments go, quoted strings with # stay.
How it works
Each line is scanned with single/double-quote awareness; a # outside quotes (preceded by whitespace or a colon) ends the line's content.
- Enter your input. Type or paste your input into the field above — the tool responds instantly.
- Review the result. Output updates live as you type. Everything runs entirely in your browser.
- Copy or download. Use the Copy button to grab the result, or Download to save it as a file.
Examples
Minifying configs
Strip comments from a config before sharing or minifying — with inline comments removed and strings left intact.
Common mistakes
# inside quoted strings
A # within a quoted value isn't a comment. The stripper is YAML-aware and only removes real comment tokens.
Frequently asked questions
Does it preserve blank lines?
Comments are replaced by blank lines by default so line numbers stay useful; compact mode removes them.
Is the result valid YAML?
Yes — removing comments never changes the parsed data.