Skip to content

Random Musical Key Generator

Pick a random key to play, write or practise in.

Loading the random musical key generator… If nothing appears, please turn on JavaScript.

Press Pick a key to get one of the 24 major and minor keys. Each result shows the key signature (the sharps or flats), the relative major or minor, and the seven notes of the scale.

Filter by major or minor, and by keys with sharps, flats or neither.

How to use the musical key generator

  1. Press Pick a key (or the spacebar).
  2. Choose major or minor under Options.
  3. Limit to sharps or flats if you are practising one kind of key signature.
  4. Play the scale using the notes shown.

Ways to use a random key

  • Scale practice: play a new scale each day on piano, guitar or any instrument.
  • Songwriting: start a song in a key you rarely use.
  • Transposing practice: move a melody into the random key.
  • Music theory: quiz yourself on key signatures and relative keys.
  • Ear training: sing the scale before you check it.

Keep, copy and share your keys

Every result has a lock button. Locked results stay put when you generate again, so you can keep the keys you like and reroll the rest. The history panel keeps your earlier results, and the back arrow takes you to the previous set if you generated one time too many. Press Wheel to put the current results on a spinning wheel and pick one with a bit of drama.

Use Copy to copy the results as a plain list, CSV or JSON, or download them as a file. Share copies a link that shows exactly the same results to whoever opens it, which is handy for games, classes and group chats.

Key signatures and relative keys

Each major key shares its key signature with one minor key, called its relative minor. For example, C major and A minor both have no sharps or flats. Sharps are added in the order F, C, G, D, A, E, B, and flats in the order B, E, A, D, G, C, F.

The minor scales shown are natural minor. F♯ major has the same sound as G♭ major, and D♯ minor the same as E♭ minor; we list one spelling of each. Pair your key with the random chord progression generator to start writing.

How the randomness works

Every result comes from your browser’s built-in cryptographic random number generator (crypto.getRandomValues). We use rejection sampling, so every item has exactly the same chance of being picked, with no bias toward the start or end of the list. Nothing is sent to a server, and share links store the exact results so the person you send them to sees the same thing.

Frequently asked questions

How many keys are there?

24: 12 major and 12 minor.

What is a relative minor?

The minor key that shares the same key signature, such as A minor for C major.

Which minor scale is shown?

The natural minor scale.

Why is G♭ major not listed?

It sounds the same as F♯ major, which we list instead.

Can I avoid repeats?

Yes. "No duplicates" stops repeats within a batch, and "Exclude already shown" works through the whole list before anything repeats.

Is the random musical key generator free?

Yes. It is free, with no sign-up.