Compile TypeScript to JavaScript with Sucrase, then minify with Terser. Strips all type annotations, produces production-ready JS. Shows compression ratio. Browser-based.
The TypeScript Minifier is a two-stage browser-based tool that first strips all TypeScript type annotations using Sucrase (the fastest TypeScript-to-JavaScript transformer), then applies Terser with `compress: true` and `mangle: true` to produce maximum-compression JavaScript. The entire pipeline — type stripping, transpilation, and minification — runs in a Web Worker inside the browser. Compression ratio and exact byte savings are displayed after each run. TSX is handled by the TSX Minifier; this tool targets `.ts` files only.
QDoes this preserve TypeScript type information?
No — Sucrase strips all type annotations as part of the TypeScript transform. The output is plain JavaScript with no type information. This is intentional: type annotations have no runtime meaning.
QWhy use Sucrase instead of the TypeScript compiler?
Sucrase is a bare-metal TypeScript stripper designed for speed — it does not perform type checking. This makes it extremely fast in the browser. For type-checked compilation, use the TypeScript compiler CLI locally.
QIs my code sent to a server?
No. Both Sucrase and Terser run in a Web Worker inside your browser. Nothing is transmitted to any server.