An interpreter is a program that translates source code written in high-level language to machine code. It is similar to compiler and does the same task of translation from high-level to low-level language. Despite of its similarity, the working mechanism of interpreter and compiler are different.