Remember that the key of C major contains no sharps or flats, the key of G contains only one sharp (F sharp) and the key of F has only one flat (B flat). These are the only key signatures that you need to memorize. Remaining sharps and flats can be found using a simple, consistent identification method.
Memorize the order of sharps using a phrase. The order of sharps is F-C-G-D-A-E-B. A good phrase to remember this is Fat Cats Go Down Alleys Eating Baloney. Sharps will always appear in this order in a key signature.
Identify the sharps in a key, as well as the name of the key signature, by locating the last sharp indicated and raising it a half step. If you have one sharp, it will always be F. Half a step up from F sharp is G, which is the name of the key signature for one sharp. If you have three sharps, they will always be F-C-G. Half a step up from the last sharp, G sharp, is A. That means the key of A has three sharps. They are always going to be F-C-G. Four sharps are F-C-G-D. Half a step up from D sharp is E, meaning the key of E has four sharps.
Identify flats using a phrase to help remember the order of flats. A good phrase for memorizing flat order is BEAD Go Catch Fish. This means flats are always added in this order: B-E-A-D-G-C-F. If you have two flats, they will always be B flat and E flat. If you have four flats, they are always B-E-A-D. To find the name of the key signature, refer to the second to last flat in your series. Four flats (B-E-A-D) is the key of A flat because A flat is the second to last flat. Three flats (B-E-A) indicate the key of E flat because E is the second to last flat in the series.