Random Key Signature Generator

One press gives a key signature; name the key, then tap to check.

Show all 15
  1. 1 sharp

All 15 key signatures

Sharps 7

  • 1 sharp G major or E minor. The sharp is F#.
  • 2 sharps D major or B minor. The sharps are F# and C#.
  • 3 sharps A major or F sharp minor. The sharps are F#, C# and G#.
  • 4 sharps E major or C sharp minor. The sharps are F#, C#, G# and D#.
  • 5 sharps B major or G sharp minor. The sharps are F#, C#, G#, D# and A#.
  • 6 sharps F sharp major or D sharp minor. The sharps are F#, C#, G#, D#, A# and E#.
  • 7 sharps C sharp major or A sharp minor. The sharps are F#, C#, G#, D#, A#, E# and B#.

Flats 7

  • 1 flat F major or D minor. The flat is Bb.
  • 2 flats B flat major or G minor. The flats are Bb and Eb.
  • 3 flats E flat major or C minor. The flats are Bb, Eb and Ab.
  • 4 flats A flat major or F minor. The flats are Bb, Eb, Ab and Db.
  • 5 flats D flat major or B flat minor. The flats are Bb, Eb, Ab, Db and Gb.
  • 6 flats G flat major or E flat minor. The flats are Bb, Eb, Ab, Db, Gb and Cb.
  • 7 flats C flat major or A flat minor. The flats are Bb, Eb, Ab, Db, Gb, Cb and Fb.

No sharps or flats 1

  • No sharps or flats C major or A minor. Nothing sits after the clef.
How this list was compiled

A closed set, computed: no sharps or flats, one to seven sharps and one to seven flats, 15 key signatures, each with its major key, its relative minor and the sharps or flats in the order they are written. Checked on 2026-09-30 against Open Music Theory, version 2 (https://viva.pressbooks.pub/openmusictheory/chapter/major-scales/ and https://viva.pressbooks.pub/openmusictheory/chapter/minor-scales-scale-degrees-and-key-signatures/): the order of sharps is F, C, G, D, A, E, B and the order of flats is the opposite; in a sharp key signature the tonic is a half step above the last sharp; in a flat key signature the tonic is the flat before the last; C major has no sharps or flats and F major has one flat; the relative minor has the same key signature and its tonic is three half steps below the major tonic. Each of those rules is checked on every card, and the major and minor names match the 30 staves of the key signature page on our sister site labelthediagram. Wording is our own. Licence: own work

How it works

This random key signature generator draws one of the 15 key signatures, from no sharps or flats to seven of either. Say the major key and its relative minor, then tap to see both, with the sharps or flats in order.

Read the full guide

Drill sharps and flats apart

A list keeps the draw to Sharps or to Flats. Start with one side until you can answer without counting, then mix them. Press once, then Add another until 5 show for a quick quiz: cover the answers, write five keys down and check them together.

Two rules that name any key

With sharps, the key is a half step above the last sharp: three sharps end on G#, so the key is A major. With flats, the second-to-last flat is the key: four flats are Bb, Eb, Ab and Db, so the key is A flat major. The relative minor sits three half steps below the major.

  • Sharps are always written in the order F, C, G, D, A, E, B; flats run the same letters backward.
  • One flat has no second-to-last flat to read, so learn it by heart: F major.

Questions and answers

How many key signatures are there?

Fifteen: one with no sharps or flats, seven with sharps and seven with flats. Each belongs to one major key and one minor key, which makes 30 keys in all.

What is a relative minor?

The minor key that shares a key signature with a major key. Its first note is three half steps below the major's: C major and A minor have no sharps or flats, and G major and E minor have one sharp.

Which key signatures sound the same on a piano?

Three pairs use the same piano keys under different names: five sharps and seven flats (B and C flat major), six sharps and six flats (F sharp and G flat major), and seven sharps and five flats (C sharp and D flat major).