"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.
There's nothing hidden in your head
The Sorting Hat can't see,
So try me on and I will tell you
Where you ought to be.
You might belong in Gryffindor,
Where dwell the brave at heart,
Their daring, nerve, and chivalry
Set Gryffindors apart;
You might belong in Hufflepuff,
Where they are just and loyal,
Those patient Hufflepuffs are true
And unafraid of toil;
Or yet in wise old Ravenclaw,
if you've a ready mind,
Where those of wit and learning,
Will always find their kind;
Or perhaps in Slytherin
You'll make your real friends,
Those cunning folks use any means
To achieve their ends.
So put me on! Don't be afraid!
And don't get in a flap!
You're in safe hands (though I have none)
For I'm a Thinking Cap!" 
- Harry Potter and the Philosopher's Stone (First appearance)
Notes and references
- ↑ Harry Potter and the Goblet of Fire, Chapter 12 (The Triwizard Tournament) - Ronald Weasley was of the opinion that the sorting hat spent all year making up the following year's sorting song. Assuming Ron is correct, this song was penned between 1990 and 1991
- ↑ Harry Potter and the Philosopher's Stone, Chapter 7 (The Sorting Hat)