Item from harry-potter-philosophers-stone by J.K. Rowling
A sentient, patched, thousand-year-old wizard's hat that reads the minds of new students and sorts them into one of four Hogwarts houses — it considered putting Harry in Slytherin before he begged it not to.
Also known as: the Sorting Hat, Sorting Hat