Compiler and interpreter both are tools to translate source code from high-level language to machine language. Both does the same task of translation. But the working mechanism of Compiler is different from interpreter . Below are some differences between compilers and interpreters