The machine can be used to change places or people into spooky, haunted houses or faces.
It uses an algorithm to generate scary versions of the photographs, and MIT is still tweaking the machine and seeking more user feedback on what makes a face scary.
The Nightmare Machine has also been used to produce nightmarish images of presidential candidates Hillary Clinton and Donald Trump.
The MIT team behind the machine said they are using it to investigate the limits of artificial intelligence.
"Creating a visceral emotion such as fear remains one of the cornerstones of human creativity," they said, explaining that they want to find out if machines are capable of scaring humans.