Golden Keys are special keys in Borderlands 2 that unlock a golden chest which gives you very powerful and rare items. Golden keys can be obtained by pre-ordering Borderlands 2, registering for a SHiFT account in Borderlands 2, redeeming SHiFT codes (which are released randomly), or ordering the GOTY edition from Steam.

Locate The Golden Mysterious Loot Chest in Pierce Station in the city of Sanctuary (i.e. where you are when you enter the game in Sanctuary or use a Fast Travel station). A golden key is consumed every time you open the Golden Mysterious Loot Chest, and your golden key amount is saved across all of your characters.

SHiFT Codes are special promotional codes released by Gearbox Software and other sources, some of which are only active for a few hours before expiring, while others have been valid for years.

Entering SHiFT Codes can reward you all sorts of stuff! Mostly just golden keys, but you might be rewarded with something else, other than just golden keys, such as:

Special Edition Custom Skins & Heads

Class & Grenade Mods

Guns, Shields, and even Relics!

All SHiFT Codes which are Black in color are still working. All SHiFT Codes which are Red in color are those that have expired.

SHiFT Codes may eventually expire. When a code expires, DO NOT REMOVE ANY CODES. Only mark that the codes have expired in the expected expiration section.

If a code is past its expiration date and still works, please change the "Expected Expiration" to "Unknown".

Please add new SHiFT Codes at the end of the table. Thanks!

Using a Golden Key to open the Golden Chest will give you an Epic Item (Purple in color), an E-Tech Gun (Dark Violet/Magenta in color), or a set of Rare Items (Blue in color). Each time you open the chest you will receive one to four items depending on what items are available, similar to how loot chests work in the rest of the game.

Any item that comes from the chest is scaled to the level of the person who opens the chest. The minimum level that the items can be however, is 7. For example, if a level 4 character opened the chest the gear would be level 7, whereas if a level 42 character opened the chest it would be level 42.

Timing is very important when opening the chest. At lower levels (i.e., Player Level 5), you can expect to receive powerful gear that will most likely be a big improvement on anything that you currently own. But, at a higher level (for instance, the max level, Player Level 72, at Overpowered Level 8), you will definitely already have powerful gear or legendary items that are more powerful than the mysterious loot chest has to offer. Also, because the item's level is scaled to your character's level, it's a good idea to open the chest very soon after you've leveled (and not to wait until you're getting close to leveling), so you can spend as much quality time as possible making good use of that same-level item. If, however, you're opening the chest to simply sell items because you're hard up for cash, timing doesn't matter much.
Occasionally, when multiple keys are used in sequence the chest may give one item (usually a rocket launcher), and remain stuck in the opened-state. But don't be alarmed! Simply exit to the main menu and Continue to resume. ***This may occur if you pick up the item before the chest is fully open.***

NOTE: It appears that SHiFT codes now (post Borderlands Pre-Sequel release) work for one game or the other. (I personally tried to use the new codes for the Pre-Sequel, after I'd already used them for that game, on Borderlands 2. The message was that I'd already used them, not that they were invalid). Others may want to look into this possibility as well. The game will tell you if the code is for another SHiFT-enabled game.

Many gamers have reported that a patch that was released December 2015 added 10 golden keys and 60 badass tokens to their account.
The result of this is also said to have reset the amount of golden keys you have to the amount that would be if none had ever been used. For example, if you had used 2 golden key codes and then opened the chest, after the patch you would have those golden keys back again as if they were never used to open the chest.

For the PS4:
(As of 09/07/2016) While you are in the game, whether in Co-op or just by your self, bring in another one of your saved characters to start the Split Screen mode, and the second character will receive 11 Golden Keys, but just on that particular character. The only way for this to work, as far as I know, is to bring in a second saved character from the same profile you are playing on your PS4, if you happen to have multiple accounts on it. And you can do it as many times as you choose, all you have to do is take the second character out of your game and then put it back in.

On October 31st, 2013, Gearbox released a set of five SHiFT Codes that unlocked special Halloween Skin Customizations for each character. In fact this is not actually expired, recently on XBOX One around the 2nd week of April 2015, I used the SHiFT Codes to unlock not only the Halloween costumes originally set for 360, but all the other costumes and heads as well. Do not worry, all the costumes and heads that have come out so far are still redeemable to this date.

On February 13th, 2014, and again February 14th, 2014, Gearbox released a SHiFT code that unlocked special Valentines Day skins Customizations for each character except Krieg. This promotion was known as 'Loverpalooza' and also gave the first character played a Heart Breaker of the same level.

A separate code for Krieg's "Loverpalooza" skin was released on March 16th, 2014, so he wasn't left out.

On March 14th, 2013, Gearbox released a SHiFT code that unlocked special Zaford Skins for each character except for Krieg. This promotion was celebrating the Luck of the Zafords. More can be read about it [on the Gearbox website.]

Some users are replacing keys with word 'Expire'. Please do not follow this practice. You are not contributing and you are just deleting keys. Make sure you have read the general guide at the bottom before you edit ANYTHING.

SHiFT codes may eventually expire. When a code expires, DO NOT REMOVE ANY CODES. Only mark that the codes have "Expired" in the "Expected Expiration" section.

DO NOT ADD COMMENTS INTO THE SOURCE CELL!

There is a limit of 255 golden keys per account. ENSURE YOU WILL NOT EXCEED THIS before redeeming a code.

If you find new golden key codes anywhere, please edit the section below to share.

Some codes are limited quantity, or expire after a few hours. You can bookmark and check often for new codes, so that you don't miss any.

On PC/Mac/Linux, you can copy and paste the codes. Be sure that you didn't copy a space or new-line character at the beginning or end of the code. If you copy with a space at the end it won't work. Please don't use spaces before and/or after the code.

For the class mod SHiFT codes, the items will appear in the backpack of, and be the same level as, the first character loaded after code redemption. If the character is above Level 51, ensure you are in Ultimate Vault Hunter Mode to receive the item of the appropriate level.

All these keys should be typed in caps.(Some of the "expired" codes still work. For PC, if it says that it is expired, but the other's aren't, it is probably not expired)