The Sorting Hat sorts first-year students into houses in J.K. Rowling’s Harry Potter books.
At Hogwarts, the enchanted hat is placed on each new student’s head during the Sorting Ceremony. It announces one of four houses: Gryffindor, Hufflepuff, Ravenclaw, or Slytherin. The hat is able to examine a student’s qualities and thoughts before making its decision.
The Sorting Hat was originally owned by Godric Gryffindor, one of Hogwarts’ four founders. It was enchanted by the founders to continue assigning students after their deaths, making the ceremony a lasting part of school tradition.
The hat does not simply measure academic ability or family background. Harry’s story shows that a student’s wishes and choices can matter, which is why the ceremony has more complexity than a random draw. The Pensieve and Mirror of Erised are separate magical objects.