Complete Pottermore Hogwarts Sorting Hat Quiz
Legend has it that the Sorting Hat was sewn roughly one thousand years ago and began as a normal hat belonging to Godric Gryffindor. When Gryffindor, along with Salazar Slytherin, Rowena Ravenclaw and Helga Hufflepuff, wondered how they would continue to sort the students when the four were dead, Gryffindor pulled his hat from his head and, along with the other founders, enchanted it with their combined intelligence. All four founders wanted to ensure that students would be sorted into their eponymous houses, which would be selected according to each founder's particular preferences in students.
The Sorting Hat, now animated, was able to sort and divide the students into the Hogwarts Houses, and continued to do so for a millennium, passed down to each new Headmaster or Headmistress of the school. When not in use, it is placed on a shelf in the current Headmaster's or Headmistress's office. Godric Gryffindor's Sword, one of the founder's only other known relics, can be magically pulled out of the hat by any Gryffindor considered worthy, no matter how secure the sword's location. It is unknown why this is possible, but is linked to loyalty of the highest regard in relation to Hogwarts. There are two known instances of this happening within the seven years of Harry's adventures, once when Harry was in the Chamber of Secrets, and once when Neville refused to join Voldemort during the