Transpiler VS Compiler

Hey, guys this is Nishant, a young coder like you all, I am writing this blog to explain what is actually a transpiler or compiler, They have a very similar definition, but aren’t they same, What is the actual difference between them ?
So What is Compiling ?

Compiling is actually a process, Where a program takes source code written in one language and produce a (or many) output file in some other language. In practice we mostly use this term to describe a compiler such as gcc which takes in C codes as input and produces a binary executable (machine code) as output.
So Since, Compiling is a process, There must be a program behind that whole process, That piece of program is actually the compiler.

So, This is all about compiling. Now
What is transpiling ?

In Transpiling, We actually converting one higher level language to another higher level language. For example, Typescript is a high level language but after it’s transpiled it’s turned into JavaScript (another high level language). Or Babel for example can transpile ES6 JavaScript code into ES5 JavaScript.
That's why Transpilers are sometimes referred to as “source to source compilers”.
Why Transpiling ?
The benefits of transpiling is you can write one language and still end up with another high level language.

So, This is all about Transpiler. Hope this helps you to understand Compiler and transpiler.
Thank You, Happy Coding