A key signature is the group of sharps or flats at the start of each line of music. It sits just after the clef. It tells you which notes to play sharp or flat all the way through the piece, and it tells you the key.
This page shows every key signature, the two keys that share each one, and quick ways to name a key at a glance.
How to read a key signature
Each sharp or flat sits on a line or in a space. It changes every note with that letter name, high or low.
One sharp on the top line of the treble staff is F sharp. It means every F in the piece is F sharp, on any line or in any space.
A natural sign in front of a note cancels the key signature for that note until the end of the measure.
Every key signature fits two keys: one major key and one minor key. The charts below name both.
Keys with sharps
Keys with flats
Every key signature in one table
| Key signature | Major key | Minor key | The sharps or flats, in order |
|---|---|---|---|
| No sharps or flats | C | A | None |
| 1 sharp | G | E | F# |
| 2 sharps | D | B | F#, C# |
| 3 sharps | A | F# | F#, C#, G# |
| 4 sharps | E | C# | F#, C#, G#, D# |
| 5 sharps | B | G# | F#, C#, G#, D#, A# |
| 6 sharps | F# | D# | F#, C#, G#, D#, A#, E# |
| 7 sharps | C# | A# | F#, C#, G#, D#, A#, E#, B# |
| 1 flat | F | D | Bb |
| 2 flats | Bb | G | Bb, Eb |
| 3 flats | Eb | C | Bb, Eb, Ab |
| 4 flats | Ab | F | Bb, Eb, Ab, Db |
| 5 flats | Db | Bb | Bb, Eb, Ab, Db, Gb |
| 6 flats | Gb | Eb | Bb, Eb, Ab, Db, Gb, Cb |
| 7 flats | Cb | Ab | Bb, Eb, Ab, Db, Gb, Cb, Fb |
On this site, the sign # means sharp and a small b after a letter means flat.
The order of sharps and flats
Sharps join a key signature in the same order every time: F, C, G, D, A, E, B. A key with three sharps has the first three, which are F sharp, C sharp, and G sharp.
Flats join in the opposite order: B, E, A, D, G, C, F. A key with three flats has B flat, E flat, and A flat.
One sentence helps with both lists. Read it forward for the sharps: “Father Charles Goes Down And Ends Battle”. Read it backward for the flats: “Battle Ends And Down Goes Charles’s Father”.
How to name a key with sharps
Find the last sharp, the one farthest to the right. Go up one half step. That note names the major key.
With two sharps, the last sharp is C sharp. One half step up is D. The key is D major.
With four sharps, the last sharp is D sharp. One half step up is E. The key is E major.
How to name a key with flats
Find the flat that is second from the right. That flat names the major key.
With three flats, the flats are B flat, E flat, and A flat. The second from the right is E flat. The key is E flat major.
One flat has no second flat to check, so learn it by heart. One flat is F major.
How to find the minor key
Each key signature also fits one minor key. It is called the relative minor.
Start on the note that names the major key and count down three half steps. From C, three half steps down is A. So no sharps or flats can mean C major or A minor.
To tell which of the two a piece is in, look at its last note. A tune most often ends on the note its key is named for. Our guide to relative major and minor keys has more ways to tell.
Key signatures on the bass staff
The order of sharps and flats is the same on the bass staff. Each sign sits one line or one space lower than it does on the treble staff.
Keys that sound the same
Three pairs of keys use the same piano keys under different names.
| Key with sharps | Key with flats |
|---|---|
| B major, 5 sharps | C flat major, 7 flats |
| F sharp major, 6 sharps | G flat major, 6 flats |
| C sharp major, 7 sharps | D flat major, 5 flats |
That is why there are 15 key signatures and only 12 major keys that sound different.
Where to go next
The circle of fifths puts every key on one round chart, so the pattern is easy to see.
The chart of the twelve major scales lists the notes in each key.
If the word key is new to you, start with scales and keys in music. For help with the staff itself, see the chart of treble clef notes.
To work out a key with no sheet music, see how to find the key of a song. For two lines that help you remember them, see the order of sharps and flats. For a way to remember the order, see the order of sharps and flats.