DocumentsImagesMediaPDF Tools

Convert TypeScript to JavaScript Online

Transpile TypeScript to JavaScript in your browser. No Node.js or tsc install needed. Perfect for learning TS and sharing code.

function greet(user: User) {
  const greeting = "Hello, " + user.name;
  return greeting;
}

const users: User[] = [
  { name: "John", age: 30, active: true },
];
Processed in your browser

TypeScript to JavaScript: no installs needed

No Node.js or npm

Transpile TypeScript directly in the browser. No tsc install, no tsconfig.json, no dependencies.

Official compiler

Uses Microsoft's TypeScript compiler compiled to WebAssembly — same output as local tsc.

Learn TypeScript

Understand exactly what the compiler generates from your types, interfaces, and generics.

Share code

Share JavaScript snippets with teams or environments that do not have TypeScript configured.

Three steps, no hassle

1

Paste your TypeScript code

Paste your .ts code: interfaces, types, generics, enums, decorators, or any TypeScript feature you want to convert to plain JavaScript.

2

Instant transpilation

The official TypeScript compiler (compiled to WebAssembly) strips type annotations and transpiles to ES2015+ JavaScript in milliseconds.

3

Copy the resulting JavaScript

Get the equivalent JavaScript ready to run in a browser, Node.js, or to share with teams that do not use TypeScript.

Got questions?

The transpiler removes all elements that are exclusive to TypeScript and have no representation in JavaScript: type annotations (: string, : number, : boolean, : T[], etc.), interfaces (interface User {}), type aliases (type ID = string), generics (<T>, <T extends U>), access modifiers (public, private, protected, readonly on classes), enumerations (enum Direction {} is converted to a JavaScript object), the as type assertion operator, the declare keyword for ambient declarations, and experimental decorators (@Component, @Injectable). Control structures, functions, classes (the value part, not the type part), import/export modules, and all program logic are preserved exactly.

The online transpiler uses the official TypeScript compiler (developed by Microsoft, published as open source in October 2012, currently at version 5.x) with target ES2015 or ES2017 configuration. For actual production, the correct workflow is: install TypeScript with npm install typescript, configure tsconfig.json with appropriate strictness (strict: true is the recommended practice since TypeScript 2.3), and run tsc or use bundlers like Vite, esbuild, SWC, or webpack with ts-loader. The advantage of an online transpiler is speed for exploration, learning, or sharing snippets — it does not replace the production toolchain with type checking, source maps, and bundle optimizations.

TypeScript has two decorator systems: legacy decorators (--experimentalDecorators, available since TypeScript 1.5 in 2015, used by Angular, NestJS, and inversify) and TC39 Stage 3 decorators (implemented in TypeScript 5.0, March 2023, following the ECMAScript proposal). The online transpiler supports both through the corresponding configuration. Legacy decorators generate JavaScript code with __decorate() and __metadata() calls; TC39 Stage 3 decorators generate cleaner code following the standard ECMAScript proposal.

TypeScript supports JSX (JavaScript XML, React's template syntax) via .tsx files. The compiler's jsx configuration controls how JSX is transformed: react (transforms to React.createElement(), classic behavior), react-jsx (transforms using React 17+'s new JSX transform, importing from react/jsx-runtime), react-native (leaves JSX untransformed), and preserve (leaves JSX for another transpiler like Babel to process). For React projects with TypeScript, the recommended workflow is to use Vite (which uses esbuild internally for TSX) or CRA/Next.js which includes TSX transpilation by default.

Yes. ES6 module imports and exports (import x from 'y', export default, export const) are preserved by default when the target is ES2015 or higher. TypeScript also removes type-only imports (import type { User } from './types'), as they have no runtime representation. When the target is CommonJS (module: commonjs in tsconfig), imports/exports are transformed to require()/module.exports, Node.js's module system. For browser use with native ES modules, the ES2015 target with module: ESNext is most appropriate.

Yes. TypeScript was designed by Anders Hejlsberg (also designer of C# and Turbo Pascal) at Microsoft and published as open source in October 2012. The official definition is that TypeScript is 'typed JavaScript at scale for large applications.' All valid JavaScript is valid TypeScript — you can rename any .js file to .ts without changes. TypeScript adds: the type system (annotations, interfaces, generics), enumerations, experimental decorators, and some advanced-stage ECMAScript features. The tsc compiler was the first widely adopted modern JavaScript transpiler, a precursor to the current ecosystem of Babel, esbuild, SWC, and Vite.

TypeScript to JavaScript online: transpile TS without installing Node.js or tsc

TypeScript is a programming language developed by Microsoft and published as open source in October 2012. It was designed by Anders Hejlsberg — also responsible for the design of C# (2000) and Turbo Pascal (1983) — with the goal of scaling JavaScript for large applications through an optional static type system. TypeScript is a syntactic superset of JavaScript (ECMAScript): all valid JavaScript is valid TypeScript, and the tsc compiler (TypeScript Compiler) outputs standard JavaScript. TypeScript 5.x (the major version branch initiated with TypeScript 5.0 in March 2023) is one of the most widely used languages according to the Stack Overflow Developer Survey 2024, with massive adoption in ecosystems such as Angular (which has required TypeScript since version 2 in 2016), NestJS, Next.js, and virtually every large-scale frontend project. The need for an online transpiler arises in several scenarios: quickly exploring how TypeScript compiles a specific feature without setting up a local project, interactive learning of the type system, sharing code with developers or teams working with plain JavaScript, and rapid prototyping of snippets.

The TypeScript-to-JavaScript transpilation process essentially consists of type erasure: the compiler analyzes the TypeScript code, verifies type system consistency (in full type-checking mode, not available in pure transpilation), and emits JavaScript removing all type information that has no runtime representation. The elements removed are: type annotations on variables, function parameters, and return types; complete interfaces and type aliases (these do not exist in JavaScript); access modifiers on classes (public/private/protected are TypeScript-only); type parameters in generics; type assertions (as Type, <Type>value); and ambient declarations (declare). The elements that are transformed (not just removed) are: enumerations (enum), which are converted to JavaScript objects with bidirectional mapping (value → name and name → value); legacy decorators with --experimentalDecorators, which generate __decorate() and __metadata() helper code; and advanced-stage ECMAScript features that TypeScript implements before they are available in all engines.

The TypeScript transpilation tooling ecosystem has evolved significantly. The original tsc compiler (written in TypeScript, available as the npm package typescript since 2012) is the behavioral reference and the one that provides full type checking. For build speed in large projects, alternatives have emerged that prioritize transpilation speed over type checking: esbuild (Evan Wallace, 2020, written in Go, 10-100x faster than tsc), SWC (2019, written in Rust, used by Next.js and Vercel), and Babel's TypeScript transformer (@babel/plugin-transform-typescript, 2018). These tools perform type erasure without checking types — for type checking in CI/CD, tsc --noEmit is run in parallel. Vite (Evan You, 2020) uses esbuild for TypeScript transpilation in development and Rollup for production. Convertir.ai uses the official TypeScript compiler compiled to WebAssembly to guarantee exact fidelity with tsc's behavior, running the entire process in your browser without sending code to any server.