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
//Related tools
JSON Formatter
Format, validate, minify, and prettify JSON data instantly.
JWT Decoder
Decode and inspect JWT tokens: header, payload, signature, expiration.
Base64 Encoder/Decoder
Encode text or files to Base64 and decode back. UTF-8 safe.
Regex Tester
Test regular expressions in real-time with match highlighting and groups.
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