TypeScript to JavaScript Converter

Convert TypeScript to plain JavaScript with the real TypeScript compiler — entirely in your browser.

input.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
output.js
1
About single-file conversion

This tool converts one file in isolation, the same way a bundler's TypeScript loader does — it reports syntax and per-file diagnostics, but not cross-file type errors that require a full project (e.g. type mismatches against another file's exports).

Your Data Never Leaves Your Device

Every tool runs entirely in your browser. Nothing you type is uploaded, stored, or logged on our servers.

100% Client-Side

The TypeScript to JavaScript Converter loads the real typescript compiler — the same one tsc uses — and converts your code the same way a build tool would: stripping types, interfaces, enums, and generics down to plain JavaScript.

Choose the output target (ES5 through ESNext), the module format (CommonJS, ES Modules, or UMD), toggle strict mode, and enable JSX for .tsx-style components. Everything runs locally in your browser — nothing you paste is uploaded anywhere.

FAQ

Yes — it loads the actual `typescript` npm package (the same compiler `tsc` uses) and calls `ts.transpileModule()`, so type annotations, interfaces, enums, and generics are stripped and converted exactly like they would be in a real TypeScript build.

It reports syntax and per-file diagnostics (things like using a reserved word, or a type-only construct in the wrong place), but not cross-file type errors — those require a full project with every file loaded, which a single-file conversion (`transpileModule`) doesn't do. This matches how most bundler TypeScript loaders behave.

It sets the JavaScript language version the output is converted down to — e.g. ES5 for maximum compatibility, or ESNext to keep the newest syntax the environment already supports.

It sets how `import`/`export` statements are converted: CommonJS (`require`/`module.exports`) for Node, ES Modules to keep `import`/`export` syntax, or UMD for scripts that need to work as both.

No. The TypeScript compiler runs entirely in your browser (loaded from this site, not a third-party CDN) — nothing you paste is sent to a server.