Sorting Hat

"Oh you may not think I'm pretty, but don't judge on what you see, I'll eat myself if you can find a smarter hat than me."

- The Sorting Hat, opening lines of the 1991 Sorting Hat song

The Sorting Hat is a sentient Hogwarts artefact which magically determines to which of the four school Houses each new student is to be assigned. These four Houses are Gryffindor, Hufflepuff, Ravenclaw and Slytherin.

The Sorting Hat originally belonged to Godric Gryffindor, one of the founders of Hogwarts. It normally lives in the Headmaster's office until it is needed; Harry Potter tried on the Sorting Hat for the second time when he was sent to Dumbledore's office for the first time in his second year.

During the opening banquet at the beginning of each school year, the first-year students are lined up and their names read aloud alphabetically. Each then takes a seat on a stool and the hat is placed on his or her head. After a moment of consideration, the hat announces its choice aloud for all to hear, and the student joins the selected house. The moment of consideration varies in length, from nearly a minute to less than a second. Judging from Harry's own account of his Sorting, and a brief comment made by Hermione, the hat may sometimes speak to the student during the Sorting.

Founders time
The Sorting Hat was sewn roughly one thousand years ago and was merely 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 off of his head and, with the other founders, enchanted it. The Sorting Hat, now animated, was able to Sort and divide the students into the Hogwarts Houses, and continued to do so for thousands of years, being owned by each Headmaster and Headmistress. 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.

The Sorting Hat songs
Before sorting the students each year, the hat recites a new introductory song. These songs vary in length and content though they generally introduce the hat and its role in sorting new students. Ron Weasley expressed the opinion that the Hat spends the entire school year making up its next song.

They also occasionally warn of danger to come, as in its 1995 song, though it is not known how the Hat is aware of upcoming events. It was suggested that the Hat picks up some of its information from Albus Dumbledore, though it is not known whether it would have done so before such an influential figure in the wider wizarding world was in office.

The Sorting Hat and Harry Potter
The Sorting Hat appeared to have a difficult time in the sorting of Harry Potter. It suggested great fame and glory would be found through joining Slytherin House, but Harry requested specifically and emphatically to be spared that fate. It was this choice that prompted the Hat to instead place him into Gryffindor, wherein both his parents had also been Sorted. When Harry tried the Hat on for the second time, it repeated its earlier declarations - that Harry was particularly hard to sort, and that he would have done well in Slytherin.

In Harry's second year at Hogwarts, the Hat also played a critical role in Harry's success against the Basilisk. Fawkes valiantly brought the Sorting Hat to Harry's aid in the Chamber of Secrets, providing him with Godric Gryffindor's Sword, which Harry used to slay the Basilisk. The sword and hat together are the two known relics of that wizard

In 1998 at Hogwarts, Lord Voldemort attempted to destroy the Hat by setting it on fire while it was on Neville Longbottom's head. Neville was able to draw from it the Sword of Godric Gryffindor, which he then courageously used to behead Nagini. However it is unclear if any damage was done to the Hat, because of Harry's earlier sacrifice, which prevented Voldemort's spells from harming those Harry cared about.

Almost two decades after the Battle of Hogwarts, Albus Severus Potter, son of Harry Potter, expressed worry over his own Sorting, indicating that the Sorting Hat had been repaired or had survived unharmed.

The Sorting Hat and Hermione Granger
"Ah, right, then. Hmm, right. Okay. GRYFFINDOR!"

- Hermione sorted into Gryffindor house

The Sorting Hat also appeared to have had a disagreement in the sorting of Hermione Granger, as her expansive intelligence and future of being the best student in her year saw her as being well suited for Ravenclaw. This is a fact that is brought up in 1995 by several Ravenclaw students during the formation of Dumbledore's Army. However, it can be argued that Hermione saw a greater challenge in herself in becoming bold and courageous, some of the traits of Gryffindor House. This can be clearly seen when Hermione doubts books and cleverness as the traits of a great witch and instead shows that friendship and bravery are more important.

The Sorting Hat and Ron Weasley
"Ah, another Weasley. Well, I know just what to do with you. GRYFFINDOR!"

- Ron sorted into Gryffindor house

It was not hard for the Sorting Hat to place Ron Weasley, as all the Weasley family have been placed into Gryffindor House. Ron was afraid that he would be the only Weasley not to make it into Gryffindor. Heritage does not seem to influence sorting that much, however, as demonstrated in the case of Sirius Black, so Ron's own merits would still have been what actually got him into the House.

The Sorting Hat and Draco Malfoy
The moment the Sorting Hat touched Draco Malfoy's head, the hat instantaneously declared "Slytherin!" In addition to having a selfish and conniving streak, Malfoy is a pure-blood, like most Slytherins, and most of his family was sorted into that house, including his parents Lucius and Narcissa Malfoy, and his aunt Bellatrix Lestrange.

The Sorting Hat and Tom Riddle
According to Albus Dumbledore, the Sorting Hat declared Tom Riddle a Slytherin almost instantly after it touched his head, a description very similar to Draco's sorting. In addition to having many of the qualities associated with the founder of his house, he was the last surviving descendant of Salazar Slytherin.

The Sorting Hat and Neville Longbottom
The Sorting Hat considered placing Neville Longbottom in Hufflepuff, but selected Gryffindor instead. Neville also ran off with the hat after his sorting, and had to return it to its stool.

Later history
Lord Voldemort placed the Sorting Hat on Neville during the Battle of Hogwarts and caused it to burst into flames. However, when reinforcements arrived, Neville was able to break free of the Body Bind and draw the Sword of Gryffindor from the Hat to kill Nagini. The details of what happened to the hat after it was set on fire are unknown. However years later when Harry's son, Albus, expressed his fear of being in Slytherin, Harry told him that the hat takes what you want into consideration, suggesting that it is still being used to sort out students.

Personality and traits
Though it's a hat, The Sorting Hat is sentient and therefore has its own personality. At the beginning of every term, the hat sings a new song (which Ron Weasley speculated it spent the rest of the year thinking up) describing each of the four houses of Hogwarts. Despite its use in the purposes of "sorting," the Hat has been known to urge students to maintain a united front in the face of adversity and danger.

That hat also appears to have a sense of humor and expansive memory (as in the cases of the Weasleys all being in Gryffindor, and the Malfoys all being in Slytherin).

Behind the scenes

 * In the film adaptation of Harry Potter and the Philosopher's Stone, the Sorting Hat appears to speak so all the students can hear, whereas in the book the Sorting Hat speaks so only the wearer can hear.
 * In the first two Harry Potter films, it is voiced by actor Leslie Phillips.
 * Songs are only featured in books 1, 4, and 5.
 * Harry was not physically present for the Sorting Hat's songs in books two, three, six and seven. Harry was, however, present for the song and Sorting ceremony in the third movie.
 * In the American edition of Harry Potter and the Philosopher's Stone, Harry saw that "there were only three people left to be sorted," but then Professor McGonagall read off four more names (Dean Thomas, Lisa Turpin, Ron Weasley and Blaise Zabini). Dean Thomas did not appear in the British edition. It is possible, however, that Harry did not see one of the first-years ahead of him.
 * A LEGO version of the Sorting Hat was released, entitled 4701 Sorting Hat. It featured a dial with the four house symbols on it that could be spun to land on one and sort the figures.
 * It is possible that the Sorting Hat had trouble with Harry Potter's son, Albus Potter. Albus might have asked not to be in Slytherin, as Harry told Albus that the Sorting Hat takes your choice into account.
 * Although Harry's sorting was the only instance of the hat taking the student's choice into account actually represented in the books, there several other characters thet could have possibly had similar experiences at sorting. Severus Snape was revealed to be extremely brave, a Gryffindor trait, but clearly expressed a desire to be in Slytherin. Dumbledore obviously had a weakness for power that would have been a typical Slytherin trait, and much ambition in his early years. It is possible that either of these characters "suggested" their house to hat. It might be also possible that the hat considered the mature state of Dumbledore when he neither desired power nor was ambitious, as it did for Neville who was a true Gryffindor in his later years.
 * Another prime example is Peter Pettigrew cunning, ambitious nature, disregard for rules, and becoming a Dark Wizard, would make him more suitable as a Slytherin, as the direct opposite of a Gryffindor, the house in which he was sorted in.
 * One of the possible choices on the W.O.M.B.A.T. aptitude test was that the hat was stolen and substituted by delinquent students in 1325, and the whereabouts of the real hat remain unknown.
 * According to J. K. Rowling, the Sorting Hat has never been wrong.

Appearances

 * Harry Potter and the Philosopher's Stone
 * Harry Potter and the Philosopher's Stone (film)
 * Harry Potter and the Philosopher's Stone (video game)
 * Harry Potter and the Chamber of Secrets
 * Harry Potter and the Chamber of Secrets (film)
 * Harry Potter and the Chamber of Secrets (video game)
 * Harry Potter and the Prisoner of Azkaban
 * Harry Potter and the Goblet of Fire
 * Harry Potter and the Goblet of Fire (film)
 * Harry Potter and the Order of the Phoenix
 * Harry Potter and the Order of the Phoenix (film)
 * Harry Potter and the Order of the Phoenix (video game)
 * Harry Potter and the Half-Blood Prince
 * Harry Potter and the Half-Blood Prince (film)
 * Harry Potter and the Half-Blood Prince (video game)
 * Harry Potter and the Deathly Hallows
 * Harry Potter and the Deathly Hallows: Part 2
 * Lego Harry Potter: Years 1-4
 * The Wizarding World of Harry Potter
 * Harry Potter: Spells
 * Harry Potter LEGO Sets

Notes and references
Sprechender Hut Choixpeau magique Распределяющая шляпа Lajitteluhattu Sorteerhoed