What is a key signature in music?
A key signature is the group of sharps or flats written at the start of each line of music, right after the clef. It tells you which notes to raise or lower every time they appear, and it points to the key the piece is in.
Open any piece of piano music and look just after the clef at the left end of the staff. Sometimes you will see a few small sharp signs (#) or flat signs (b) sitting on particular lines and spaces. That cluster is the key signature. If there is nothing there, the piece has no sharps or flats in its signature.
The idea is simple: instead of writing a sharp next to every F in a song, the composer writes one sharp on the F line at the start, and it applies to the whole piece. It saves ink and makes the page easier to read once you know the code.
What a key signature actually tells you
A key signature does two jobs.
- It changes notes automatically. A sharp on the F line means every F you meet is played as F sharp, in every octave, from the first bar to the last (unless the music says otherwise).
- It hints at the home key. The sharps or flats match the notes of a major scale or its relative minor, so you can tell where the music will feel "at home".
On a piano, a sharp means you move to the very next key to the right (usually a black key), and a flat means the very next key to the left. So a key signature with one sharp on F means: wherever you see F, play the black key just above it.
The sharps and flats come in a fixed order
Key signatures never use random notes. The sharps always appear in this order:
F, C, G, D, A, E, B
The flats appear in the exact reverse order:
B, E, A, D, G, C, F
So if a piece has two sharps, they are always F sharp and C sharp. If it has two flats, they are always B flat and E flat. Many teachers use a memory phrase for the sharps, such as "Father Charles Goes Down And Ends Battle", and read it backwards for the flats. Pick any phrase that sticks, since teachers differ on which one they prefer.
A quick chart of the common keys
Here are the keys beginners meet most often. Each major key shares its signature with a relative minor key, which starts on the sixth note of the major scale (see relative major and minor keys).
| Major key / relative minor | Signature | Altered notes |
|---|---|---|
| C major / A minor | none | none |
| G major / E minor | 1 sharp | F sharp |
| D major / B minor | 2 sharps | F sharp, C sharp |
| A major / F sharp minor | 3 sharps | F sharp, C sharp, G sharp |
| F major / D minor | 1 flat | B flat |
| B flat major / G minor | 2 flats | B flat, E flat |
| E flat major / C minor | 3 flats | B flat, E flat, A flat |
If you want to see one of these keys on its own page, try G major.
How to find the key from the signature
There are two handy shortcuts for major keys.
- For sharps: find the last sharp in the signature (the one furthest right). The major key is the note one half step above it. Last sharp is C sharp? The key is D major. Last sharp is F sharp (only one sharp)? The key is G major.
- For flats: look at the second-to-last flat. That note names the major key. With flats B flat and E flat, the second-to-last is B flat, so the key is B flat major.
- One flat is the exception. A single flat (B flat) means F major, because there is no second-to-last flat to look at. Just memorize this one.
Then, to decide between major and minor, listen and look. The piece usually begins or ends on the home note, and minor pieces often use extra sharps along the way. A signature alone gives you two possible keys, the major and its relative minor, so the music itself settles it.
Key signature versus accidentals
You will also see sharps, flats and natural signs written beside individual notes in the middle of the music. These are accidentals. An accidental changes only that note, and it lasts until the end of the bar (measure). At the next bar line, the key signature rules again.
A natural sign (a small square with a tail) cancels a sharp or flat. If the key signature says F sharp, and you see a natural sign before an F, play plain F for the rest of that bar.
How to practice reading key signatures
You do not need to memorize every key at once. A gentle path works well:
- Start with C major, then add G major and F major, which have only one sharp or flat.
- Before you play, name the sharps or flats out loud and find them on the keyboard.
- Play the matching scale slowly first, so your hands learn where the black keys fall.
- Later, explore the circle of fifths, which shows how all the keys are connected.
If you like learning by playing, the free game Keyfall shows the letter name on every note and has a Starter mode that waits for you and shows which key to press, so you can get comfortable with black keys without the pressure of the clock. It is a practice tool for fun, not a replacement for a teacher.
Common mistakes to avoid
- Forgetting the signature applies to every octave. A sharp on the top F line also applies to every other F on the staff, high or low.
- Ignoring the signature after the first line. The signature is repeated at the start of every line, so keep it in mind.
- Treating black keys as scary. In keys like G major, the black key is simply part of the scale. It will feel natural quickly.
With a little practice, glancing at the signature before you play becomes a habit, and it will make new pieces much less of a surprise.
More about music theory
FAQ
Does a key signature change the whole song?
Yes, it applies from the start of the piece until the music shows a new key signature. Some pieces change key partway through, and then a new signature appears on the staff.
How many key signatures are there?
There are 15 possible signatures when you count from seven sharps to seven flats, and each one can be major or its relative minor. Beginners usually only need the ones with up to three sharps or flats.
Why does C major have no sharps or flats?
The C major scale uses only the white keys on the piano, so no notes need to be raised or lowered. A minor shares this signature because it uses the same notes.
Is a key signature the same as a time signature?
No. The key signature shows sharps or flats and tells you the key, while the time signature is two numbers that tell you how many beats are in each bar.
Do I need to memorize all the key signatures to play piano?
Not at first. Learn the simple ones, and use the order of sharps and flats to work out the rest as you go. Most players pick them up naturally with practice.
How can I tell if a piece is major or minor from the key signature?
The signature gives you two options, a major key and its relative minor. Check the final chord or note, and listen: major tends to sound bright and minor tends to sound darker.
Practise it on your own piano. Keyfall is a free piano game: notes fall toward the keys and you play them on a digital piano, keyboard, phone or computer.
Play free