Random Key Signature Generator
Draws a key and asks you the question an exam asks: how many sharps or flats, and which ones, in which order. The answer is calculated from the circle of fifths rather than looked up in a table, and it comes with the relative major or minor so you can drill both directions at once.
What this generator does
Gives you a key and its full key signature: the number of sharps or flats, the specific notes that carry them, and the conventional order they are written in. It also gives the relative major or minor, which shares the same signature. Because the answer is derived rather than stored, it is right for every key including the ones at the far end of the circle where most printed tables stop.
How to use this tool
- Choose major keys, minor keys or both.
- Choose how far round the circle of fifths to go — up to four accidentals for beginners, or all fifteen keys.
- Press Draw key, then work out the answer before revealing it.
- Check the sharps or flats and their order, not just the count.
Understanding the controls
- Key type
- Major, minor or both. Drawing both is harder, because the same signature belongs to two keys and you have to decide which one you have been given.
- Difficulty
- Limits how far round the circle the draw reaches. Up to two accidentals covers most beginner repertoire; up to four covers most grade-five theory; all fifteen includes C♯ major and C♭ major, which are rare but examinable.
- Show relative key
- Off, you get the key alone. On, you also get the relative major or minor that shares its signature — the relationship that makes the circle of fifths worth learning.
Worked examples
- E major
- Four sharps: F♯ C♯ G♯ D♯. Its relative minor is C♯ minor.
- A♭ major
- Four flats: B♭ E♭ A♭ D♭. Its relative minor is F minor.
- B minor
- Two sharps: F♯ C♯. Its relative major is D major.
- C♭ major
- Seven flats — every note. Rare, examinable, and enharmonically the same as B major.
Common use cases
- Grade theory revision, where key signatures are guaranteed to come up
- A quick warm-up before a lesson or rehearsal
- Learning the circle of fifths as a relationship rather than a diagram to memorise
- A teacher generating flashcard-style questions for a class
- Sight-reading preparation — knowing the key before you start is most of the battle
How this generator works
Each key sits at a position on the circle of fifths, counted in fifths from C. That position is the number of sharps, or, going the other way, the number of flats. Sharps are always added in the order F, C, G, D, A, E, B, and flats in exactly the reverse order — B, E, A, D, G, C, F — so knowing the count tells you precisely which notes are affected. The relative minor is three semitones below the major tonic, spelled by stepping down two letter names, which is why A minor pairs with C major rather than some enharmonic equivalent.
Randomness and fairness
The key is chosen by the browser's cryptographic random number generator from whichever range the difficulty setting allows. Everything else — the count, the specific accidentals, their order, the relative key — is derived from music theory and is not random at all. A seed makes the sequence reproducible so a class can be set the same questions.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- It does not display a stave, so you get the accidentals by name rather than positioned on lines and spaces.
- Minor keys are given by their signature, which does not show the raised seventh a harmonic minor uses — that accidental is written into the music, not the signature.
- Enharmonic keys such as B major and C♭ major sound identical; the tool treats them as different keys, because notation does.
- There is no scoring or progress tracking; it draws questions rather than running a test.
Common mistakes
- Memorising the count but not the order
- Examiners ask which sharps, not just how many. F-C-G-D-A-E-B for sharps and the exact reverse for flats — learn the sentence, not the number.
- Confusing the relative minor with the parallel minor
- C major's relative minor is A minor, which shares its key signature. C minor is its parallel minor and has three flats. They are different relationships.
- Assuming a piece in a minor key uses only its signature's notes
- Harmonic and melodic minor raise the seventh, and sometimes the sixth, with accidentals written in the bar. The signature is the starting point, not the whole story.
Practical tips
- Answer out loud before revealing, including the order — guessing silently and then agreeing with the answer teaches nothing.
- Drill majors and minors together once the individual keys are secure; deciding which key a signature represents is the actual exam skill.
- Start at four accidentals rather than seven; the far keys are rare enough that fluency in the near ones matters more.
Privacy and your data
Nothing is entered, nothing is saved and nothing leaves your browser. Analytics records that a key was drawn and at what difficulty; it never records a sequence of questions or anything identifying.
Frequently asked questions
- How many key signatures are there?
- Fifteen, counting each spelling separately: seven with sharps, seven with flats, and C major with neither. Each serves both a major key and its relative minor, so thirty keys share fifteen signatures.
- Why do sharps and flats have a fixed order?
- Because each step round the circle of fifths adds exactly one accidental, and it is always the next note a fifth up (for sharps) or a fourth up (for flats). The order F-C-G-D-A-E-B is the circle of fifths itself, written out.
- What is the difference between B major and C♭ major?
- On a keyboard, nothing — they sound the same. On paper, B major has five sharps and C♭ major has seven flats. Composers choose whichever makes the surrounding music easier to read.
- Is this the same as the circle of fifths?
- It is the circle of fifths asked as questions. The circle is the diagram; this draws a random point on it and asks you what belongs there.
Related generators
- Random Scale GeneratorDraw a random scale to practise — major, minor, modal, pentatonic or blues — correctly spelled, with its key signature and degree numbers.
- Random Chord GeneratorDraw a random chord — triad, seventh, suspended or extended — with the notes it is built from and the intervals between them.
- Random Chord Progression GeneratorGenerate a chord progression in any key — either a well-known pattern or a fresh sequence — with Roman numerals and the actual chord names.