Minify TypeScript source files by stripping type annotations, interfaces, enums (converted to values), whitespace, and comments. The output is lean, production-ready JavaScript. All processing runs entirely in your browser — your source code never reaches a server.
TypeScript minification is a two-step process: first, type annotations, interfaces, type aliases, and other TypeScript-specific syntax are stripped (since browsers cannot execute TypeScript directly), and then the resulting JavaScript is minified by removing whitespace, comments, and optional tokens. The output is semantically identical JavaScript that loads and executes faster than both the original TypeScript source and non-minified compiled JavaScript.
In a production build pipeline, TypeScript is normally compiled by the tsc compiler and then minified by a bundler like esbuild, Rollup, or Webpack. This browser-based tool is ideal for quick experiments, snippets, and situations where you want to understand what gets stripped from a piece of TypeScript code without setting up a full build environment.
: string, : User[], genericsinterface and type declarations//) and block (/* */) comments.ts / .tsx file.js fileinterface Foo { … } declarations removed entirelytype Alias = … statements removedparam: string stripped<T> and Array<string> removed--minify) or tsc + TerserIt is important to understand the difference between TypeScript compilation and TypeScript minification. Compilation (tsc) checks your types and emits JavaScript, but the output is typically still readable and unminified. Minification is a separate step that reduces file size without changing runtime behavior. In modern build tools like esbuild and Vite, both steps are combined — esbuild can strip types and minify in a single pass in milliseconds without actually running the TypeScript type-checker.
This tool performs a best-effort minification entirely in the browser using regular expressions and heuristics. It handles the most common TypeScript patterns but is not a full TypeScript compiler. For complex generics, conditional types, decorators, or namespace-heavy code, always verify the output before deploying to production. For critical builds, pair tsc --noEmit for type checking with a dedicated minifier like esbuild or Terser for the final output.