Strips comments, blank lines and extra whitespace without touching string content or breaking your code.
This tool strips comments, blank lines and leading/trailing whitespace from CSS and JavaScript, reducing file size while keeping every line break intact โ a deliberately conservative approach that never renames variables or joins lines together, so it can't break your code through JavaScript's automatic semicolon insertion (ASI) quirks.
Useful for inline <style> or <script> blocks, quick pre-deploy checks, or trimming code snippets for a code review โ all processing happens locally in your browser, nothing is uploaded anywhere.
No. The tool tracks string literals (single quotes, double quotes, and template literals for JS) and leaves their content untouched. A // or /* sequence inside a string or regex is never mistaken for the start of a comment โ it's copied through as-is.
Aggressively joining JavaScript lines risks breaking automatic semicolon insertion (ASI): if a line doesn't end with ; and the next one starts with ( or [, merging them changes the meaning of the code. This tool keeps line breaks intact and only removes comments, blank lines and extra whitespace โ a guaranteed-safe transformation.
It depends on the source: typically 10-30% for well-documented code with moderate indentation, up to 40%+ for files with large comment blocks such as license headers. For maximum compression with variable renaming, use a dedicated build tool like Terser or cssnano in your production pipeline.