Strip TypeScript-specific syntax to produce clean JavaScript. Removes type annotations, interfaces, type aliases, enums, generics, access modifiers, and type assertions. Converts enums to Object.freeze objects. Runs entirely in your browser -- fast, free, and private.
Strips all type annotations from variables, parameters, and return types. Handles primitive types, union types, array types, and complex generic types.
Removes entire interface and type alias declarations including multi-line blocks with nested properties and generic constraints.
Converts TypeScript enums into JavaScript Object.freeze() objects, preserving the enum values and providing runtime immutability.
Removes public, private, protected, and readonly keywords from class properties and methods, producing valid JavaScript class syntax.
Strips generic type parameters, "as Type" assertions, and non-null assertions (!) to produce clean JavaScript without any TypeScript remnants.
Everything runs in your browser using JavaScript. No data is sent to any server. Your code stays completely private on your machine.
TypeScript is a superset of JavaScript that adds optional static typing, interfaces, enums, generics, and other type-system features. While TypeScript must be compiled to JavaScript before running in browsers or Node.js, sometimes you need a quick way to strip the types without setting up a full build pipeline.
This converter is ideal for quick one-off conversions, learning how TypeScript maps to JavaScript, sharing code snippets with developers who don't use TypeScript, debugging type-related issues, or extracting the runtime logic from TypeScript code. For production builds, use the official TypeScript compiler (tsc) or bundlers like esbuild, swc, or Babel with the TypeScript plugin.
enum Status { Active = "ACTIVE" } becomes const Status = Object.freeze({ Active: "ACTIVE" });. This preserves the enum values while adding immutability.
Check out our other free developer tools for code formatting, conversion, and analysis -- all from your browser with no sign-up required.