Compress TypeScript files online free. Remove comments, whitespace, and reduce .ts file size without breaking type safety.
Losslessly shrink PNG files.
Compression Level
⬆️
Drop a png compressor file here or click to browse
.png
Compress TypeScript files online free. Remove comments and whitespace from .ts code. Reduce size without breaking types.
TypeScript source files often contain many comments, JSDoc, and formatting that increase file size. Our TypeScript Compressor removes all unnecessary whitespace and comments while preserving every type annotation, interface, and decorator. The result is a smaller .ts file that compiles exactly the same.
// comment)/* comment */)/** ... */) – optional keepAll TypeScript-specific syntax – types, interfaces, enums, generics, decorators – remains intact.
| Original TypeScript | Compressed TypeScript | Reduction |
|---|---|---|
// Greeting function
function greet(name: string): string {
return `Hello, ${name}`;
} |
function greet(name:string):string{return`Hello, ${name}`;} |
~35% |
Original (with JSDoc and comments): 500 KB
After TypeScript compression: 320 KB (36% saving)
After + gzip: 85 KB (83% total saving)
TypeScript library authors, front-end developers, open-source maintainers, and teams shipping .ts source files.
// @ts-ignore or remove themTODO or FIXMESee the JSON FAQ above for 50+ answers. In short – safe, fast, and free.
Everything you need to know about this tool