Random Key Signature Generator

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

  1. 1 sharp
All 15

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

After your first press, the chips keep the draw to Sharps or to Flats. Start with one side until you can answer without counting, then mix them. Set the count to 5 for a quick quiz: cover the answers, write five keys down and check them together.

Two rules that name any key

With sharps, the last sharp is a half step below the key: three sharps end on G♯, so the key is A major. With flats, the second-to-last flat is the key: four flats are B♭, E♭, A♭ and D♭, so the key is A♭ major. The relative minor sits three half steps below the major.

Tips
  • 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♭ major), six sharps and six flats (F♯ and G♭ major), and seven sharps and five flats (C♯ and D♭ major).

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♯ minor. The sharps are F♯, C♯ and G♯.
  • 4 sharps E major or C♯ minor. The sharps are F♯, C♯, G♯ and D♯.
  • 5 sharps B major or G♯ minor. The sharps are F♯, C♯, G♯, D♯ and A♯.
  • 6 sharps F♯ major or D♯ minor. The sharps are F♯, C♯, G♯, D♯, A♯ and E♯.
  • 7 sharps C♯ major or A♯ minor. The sharps are F♯, C♯, G♯, D♯, A♯, E♯ and B♯.

Flats 7

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

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 by script and not typed: 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 last sharp is a half step below the tonic; in a flat key signature the second-to-last flat is the tonic; 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. The script asserts each of those rules 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