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 read off the spelled scale 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, the count, the letters and their order always agree with each other.
How to use this tool
- Choose major keys, minor keys or both.
- Choose how far round the circle of fifths to go — up to two or four accidentals, or the widest setting.
- 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; the widest setting reaches six sharps or flats, as far as F♯ major and E♭ minor.
- 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.
- Seed
- A word or phrase makes the draw reproducible: the same word with the same settings gives the same key, so a class can be set the same question and each further question needs a new word.
Worked examples
- Major and minor, up to 4, seed round9
- A minor. No sharps or flats. Relative major: C major — the same key signature.
- Major only, up to 4, seed round9
- E♭ major. 3 flats: B E A. Relative minor: C minor.
- Minor only, widest setting, seed round9
- F minor. 4 flats: B E A D. Relative major: A♭ major.
- Major only, up to 2, seed round9
- F major. 1 flat: B. Relative minor: D minor.
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 draw reproducible, so a class can be set the same question; each further question needs a new word. Seeding is deterministic, not cryptographic: the same word with the same settings always gives the same key, which is the point of it and also the reason it is no use where the result must be unguessable.
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.
- The draw covers twelve major and twelve minor keys, none with more than six sharps or flats. C♯ major and C♭ major, with seven, are never drawn.
- 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 the widest setting; 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 the key that was drawn never leaves your browser. Analytics records only that the tool was used; it never records which key was drawn, the difficulty 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 — a triad or a seventh chord — 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.
- Temperament Cents CalculatorShows how far each equal-tempered interval sits from the pure ratio, in cents and in beats you could count.
- Chord Chart TransposerTransposes a pasted chord chart by any number of semitones without touching the words, and works out where the capo goes for every position.