Walter Hunt, an American inventor, created the safety pin in 1849.