A key signature is a set of sharps or flats written at the beginning of a staff that tells you which notes are altered throughout the piece. Instead of marking every F as F# individually, you write one sharp at the beginning and every F in the piece is played sharp.

How Key Signatures Work

Key signatures appear right after the clef on the staff. The sharps or flats are placed in a specific order on specific lines and spaces, and this order is always the same regardless of the key:

  • Order of sharps: F# – C# – G# – D# – A# – E# – B#
  • Order of flats: B♭ – E♭ – A♭ – D♭ – G♭ – C♭ – F♭

The number of sharps or flats tells you which key you're in.

Sharp Keys

SharpsMajor KeyRelative Minor
0C majorA minor
1 (F#)G majorE minor
2 (F#, C#)D majorB minor
3A majorF# minor
4E majorC# minor
5B majorG# minor
6F# majorD# minor
7C# majorA# minor

Flat Keys

FlatsMajor KeyRelative Minor
1 (B♭)F majorD minor
2 (B♭, E♭)B♭ majorG minor
3E♭ majorC minor
4A♭ majorF minor
5D♭ majorB♭ minor
6G♭ majorE♭ minor
7C♭ majorA♭ minor

Quick Tricks for Reading Key Signatures

For sharps: The last sharp in the key signature is the leading tone (the 7th degree). The key is one half step above it. If the last sharp is F#, the key is G major.

For flats: The second-to-last flat in the key signature is the tonic. If you see B♭ and E♭, the key is B♭ major. (The exception: one flat = F major.)

Major vs Minor Keys

Every key signature represents two keys — a major key and its relative minor. Both use the same notes. G major and E minor share one sharp (F#). To tell which one a piece is actually in, look at where the music gravitates. Does it feel resolved on G or on E?

Why Key Signatures Matter

Key signatures exist to reduce clutter on the page. More practically, understanding them tells you immediately which notes are "in" the key — so you know what chords are available, which notes fit a melody, and how far you are from other related keys. The circle of fifths visualizes all key signatures and their relationships at a glance.