The Sorting Hat is voiced by Leslie Phillips (1924–2022), a distinguished British character actor, in all eight Harry Potter films. The hat is a sentient magical artifact created by Godric Gryffindor to sort new Hogwarts students into their houses—Gryffindor, Hufflepuff, Ravenclaw, or Slytherin—based on their qualities and choices.