We use cookies to understand how the site is used and to display ads. Analytics and advertising only run after you accept. You can change your choice anytime via the footer link or your browser settings. Privacy policy

Skip to content
>_devvkit

JS Minifier/Beautifier

Minify and beautify JavaScript with comment stripping and gzip sizing.

Input: 202 BOutput: 143 B

Conservative minifier: strips comments and collapses whitespace without renaming identifiers. Gzip size uses the browser's native CompressionStream. Validation runs code in a throwaway Function — safe for non-executing checks.

//Share this tool

Minify and beautify JavaScript without changing semantics. Strips comments, collapses whitespace, validates with the browser parser, and estimates gzip size.

[x]Features
  • -Comment stripping (line and block)
  • -Whitespace collapsing with string safety
  • -Beautifier with proper indentation
  • -Syntax validation via the browser parser
  • -Gzip size estimate using CompressionStream
  • -Download minified output as .js file
>Use Cases
  • >Reducing asset size before publishing
  • >Preparing minified snippets for CDN inline scripts
  • >Cleaning up generated or compiled JavaScript for review
  • >Checking how much compression gzip adds

Frequently Asked Questions

>How aggressive is the minification??
Conservative. Comments are stripped and whitespace is collapsed, but identifiers and line structure are preserved, so the output is always safe and never changes semantics.
>Can it compress ES modules or modern syntax??
It works on any valid JavaScript, including modern syntax, since validation uses the browser's own parser.