Founder's era (c. 993 AD)
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 stays in the Headmaster's office until it is needed; Harry Potter talked to 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 her or his head. The hat is battered and old; it's patched, frayed, and extremely dirty. In order to speak and sing, a tear along the brim opens like a mouth. It speaks inside of the hat with a small, quiet voice to the wearer and it can use Legilimency to interpret their thoughts and respond to them. 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 five minutes (known as "hatstall") 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.
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 with brains and some amount of personality. 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, being owned by each Headmaster and Headmistress. It does so at the beginning of the start-of-term feast, when it is placed on a three-legged (sometimes four-legged) stool in front of the Great Hall. 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's 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.
Oh you may not think I'm pretty,
A thousand years or more ago
In times of old, when I was new,
Good Hufflepuff, she took the rest
The Sorting Hat with students
The Sorting Hat appeared to have a difficult time in the sorting of Harry Potter. It suggested that Harry would have great fame and glory by joining Slytherin House, but Harry requested specifically to be spared that fate. Instead, based upon this choice, the Hat placed him in Gryffindor, where both his parents had also been Sorted. When Harry spoke to the Hat in his second year, it repeated its earlier declarations - that Harry would have done well in Slytherin.
In the next year at Hogwarts, the Hat also played a critical role in Harry's success against the Basilisk. Fawkes had brought the Sorting Hat to Harry's aid in the Chamber of Secrets.This provided him with Godric Gryffindor's Sword, which Harry used to slay Slytherin's Heir. The sword and hat together are the two known relics of that wizard.
Almost two decades after the Battle of Hogwarts, Albus Severus Potter expressed worry over his own Sorting. He indicated that the Sorting Hat might put him in the Slytherin House, and that its judgement may be faulty after being repaired.
- "Ah, right, then. Hmm, right. Okay. GRYFFINDOR!"
- —Hermione sorted into Gryffindor house[src]
The Sorting Hat also appeared to have had a disagreement in the sorting of Hermione Granger, as her expansive intelligence made her well suited for Ravenclaw. 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.
- "Ah, another Weasley. Well, I know just what to do with you. GRYFFINDOR!"
- —Ron sorted into Gryffindor house[src]
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.
The moment the Sorting Hat was placed on Draco Malfoy, the hat instantaneously declared Draco would become Slytherin. In addition to behaving selfish and cunning, Malfoy is a pure-blood, like most Slytherins. Almost all of his family was sorted into that house, including his parents Lucius and Narcissa Malfoy, and his aunt Bellatrix Lestrange.
According to Albus Dumbledore, the Sorting Hat declared Tom Riddle a Slytherin almost instantly after it touched his head. He had many of the qualities associated with the Slytherin house, and he was the last surviving descendant of Salazar Slytherin.
The Sorting Hat took a long time to decide upon where to put Neville Longbottom. During his sorting Neville Longbottom argued with the hat, saying he was best in Hufflepuff. The Hat argued otherwise, and declared Neville to do greatly in Gryffindor. Neville was intimidated by Gryffindor's reputation, however his persistance did not work and the hat successfully sorted him into Gryffindor.  Considering the bravery Neville showed in his seventh year, and standing up to Draco, Harry, Ron, and Hermione in his first year, this choice is not regretted.
Later, Albus Potter was concerned that he might be placed in Slytherin, but his father Harry told him he could always ask to be placed in Gryffindor.
The Sorting Hat considered Sorting Filius Flitwick into Gryffindor before choosing Ravenclaw. Later, he became a teacher at Hogwarts and head of his house, and joked with Minerva McGonagall about the fact that they had the opposite experiences and if things had gone another way, they could have had each others' jobs.
The Sorting Hat considered Sorting Minerva McGonagall into Ravenclaw before choosing Gryffindor. Later, she became a teacher at Hogwarts, and put the Sorting Hat on the heads of new students.
Personality and traits
Though it's a hat, the Sorting Hat is sentient and 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.
The Sorting Hat on Pottermore
The Sorting Hat on Pottermore uses a set of question to determine the house of a user. The questions vary in style and do not necessarily have four answers (one for each house). There are 27 questions in all, and each user can be asked a maximum of 7, or 8 if the hat can not decided between houses and asks your opinion. Generally, a set of a few questions can be given to a user for each question, there are, of course, occasional exceptions to the order.
Which of the following would you most hate people to call you?
After you have died, what would you most like people to do when they hear your name?
- Miss you, but smile
- Ask for more stories about your adventures
- Think with admiration of your achievements
- I don’t care what people think of me after I’m dead; it’s what they think of me while I’m alive that counts
Given the choice, would you rather invent a potion that would guarantee you:
How would you like to be known to history?
- The Wise
- The Good
- The Great
- The Bold
You enter an enchanted garden. What would you be most curious to examine first?
- The silver leafed tree bearing golden apples
- The fat red toadstools that appear to be talking to each other
- The bubbling pool, in the depths of which something luminous is swirling
- The statue of an old wizard with a strangely twinkling eye
What kind of instrument most pleases your ear?
- The violin
- The trumpet
- The piano
- The drum
Four boxes are placed before you. Which would you try and open
- The small tortoiseshell box, embellished with gold, inside which some small creature seems to be squeaking.
- The gleaming jet black box with a silver lock and key, marked with a mysterious rune that you know to be the mark of Merlin.
- The ornate golden casket, standing on clawed feet, whose inscription warns that both secret knowledge and unbearable temptation lie within.
- The small pewter box, unassuming and plain, with a scratched message upon it that reads ‘I open only for the worthy.’
Four goblets are placed before you. Which would you choose to drink?
- The foaming, frothing, silvery liquid that sparkles as though containing ground diamonds.
- The smooth, thick, richly purple drink that gives off a delicious smell of chocolate and plums.
- The golden liquid so bright that it hurts the eye, and which makes sunspots dance all around the room.
- The mysterious black liquid that gleams like ink, and gives off fumes that make you see strange visions.
Once every century, the Flutterby bush produces flowers that adapt their scent to attract the unwary. If it lured you, it would smell of:
- A crackling log fire
- The sea
- Fresh parchment
A troll has gone berserk in the Headmaster’s study at Hogwarts. It is about to smash, crush and tear several irreplaceable items and treasures, including a cure for dragon pox, which the Headmaster has nearly perfected; student records going back 1000 years and a mysterious handwritten book full of strange runes, believed to have belonged to Merlin. In which order would you rescue these objects from the troll’s club, if you could? Select order:
- Merlin’s Book/Student Records/Dragon Pox Cure
Which would you rather be:
Which of the following do you find most difficult to deal with?
- Being ignored
What are you most looking forward to learning at Hogwarts?
- Apparition and Disapparition (being able to materialise and dematerialise at will)
- Transfiguration (turning one object into another object)
- Flying on a broomstick
- Hexes and jinxes
- All about magical creatures, and how to befriend/care for them
- Secrets about the castle
- Every area of magic I can
If you could have any power, which would you choose?
- The power to read minds
- The power of invisibility
- The power of superhuman strength
- The power to speak to animals
- The power to change the past
- The power to change your appearance at will
Which of the following would you most like to study?
One of your house mates has cheated in a Hogwarts exam by using a Self-Spelling Quill. Now he has come top of the class in Charms, beating you into second place. Professor Flitwick is suspicious of what happened. He draws you to one side after his lesson and asks you whether or not your classmate used a forbidden quill. What do you do?
- Lie and say you don’t know (but hope that somebody else tells Professor Flitwick the truth).
- Tell Professor Flitwick that he ought to ask your classmate (and resolve to tell your classmate that if he doesn’t tell the truth, you will).
- Tell Professor Flitwick the truth. If your classmate is prepared to win by cheating, he deserves to be found out. Also, as you are both in the same house, any points he loses will be regained by you, for coming first in his place.
- You would not wait to be asked to tell Professor Flitwick the truth. If you knew that somebody was using a forbidden quill, you would tell the teacher before the exam started.
You and two friends need to cross a bridge guarded by a river troll who insists on fighting one of you before he will let all of you pass. Do you:
- Attempt to confuse the troll into letting all three of you pass without fighting?
- Suggest drawing lots to decide which of you will fight?
- Suggest that all three of you should fight (without telling the troll)?
- Volunteer to fight?
Which road tempts you most?
- The wide, sunny, grassy lane
- The narrow, dark, lantern-lit alley
- The twisting, leaf-strewn path through woods
- The cobbled street lined with ancient buildings
Which nightmare would frighten you most?
- Standing on top of something very high and realising suddenly that there are no hand- or footholds, nor any barrier to stop you falling
- An eye at the keyhole of the dark, windowless room in which you are locked
- Waking up to find that neither your friends nor your family have any idea who you are.
- Being forced to speak in such a silly voice that hardly anyone can understand you, and everyone laughs at you
Late at night, walking alone down the street, you hear a peculiar cry that you believe to have a magical source. Do you:
- Proceed with caution, keeping one hand on your concealed wand and an eye out for any disturbance?
- Draw your wand and try to discover the source of the noise?
- Draw your wand and stand your ground?
- Withdraw into the shadows to await developments, while mentally reviewing the most appropriate defensive and offensive spells, should trouble occur?
A Muggle confronts you and says that they are sure you are a witch or wizard. Do you:
- Ask what makes them think so?
- Agree, and ask whether they’d like a free sample of a jinx?
- Agree, and walk away, leaving them to wonder whether you are bluffing?
- Tell them that you are worried about their mental health, and offer to call a doctor.
Dawn or dusk?
Moon or stars?
Forest or river?
Black or white?
Heads or tails?
Left or right?
QUESTION 8: (in case of a hat stall)
Which House would you rather belong to?
<ref>tags exist, but no
<references/>tag was found