What is Transpiler?
A compiler that converts source code between languages of similar abstraction, such as TypeScript or modern JavaScript to ES5.
Definition
A transpiler is a source-to-source compiler: Babel rewrites modern JavaScript syntax (optional chaining, class fields) into forms older engines understand; the TypeScript compiler and swc strip types and emit plain JavaScript; Sass compiles to CSS. Unlike a traditional compiler targeting machine code, output stays human-readable in the same abstraction tier. Transpilers handle syntax only—new runtime APIs like structuredClone still need polyfills, which is why Babel pairs with core-js. As evergreen browsers narrowed the compatibility gap, transpilation targets moved forward, and Rust/Go-based tools (swc, esbuild) replaced Babel in most build pipelines for speed.

