How to lock a chest in Minecraft

A locked chest (Image via Minecraft)
A locked chest (Image via Minecraft)

Chests are an essential part of the building, housing, and, more importantly, storage aspects of Minecraft. Chests allow players to store all their loot to keep it safe from hostile mobs or free up inventory space. If a player gets killed while in survival mode, and with the “keepinventory” command turned to “true,” they face the risk of potentially losing all their gear.

Locking a chest in Minecraft is a feature that was first added to the game as part of the April Fool’s celebrations by the developers. The feature has since been implemented in the game and lets players use commands to lock a chest.

Everything players need to know about locking a Minecraft chest


The chest locking feature is mostly used in the adventure mode of the game. Adventure mode allows players to build their own levels or maps for the game.

The creator of each map can choose what the map is used for and can design it according to a few different categories, some of which include puzzle maps, adventure maps, horror maps, and more.

In adventure mode, and especially on maps that are intended for multiple players, the map’s host usually puts a certain amount of restrictions on objects and locations around the map. This is done to not disturb the original layout and state of the map.


In addition to making some areas inaccessible and many objects and items unbreakable, map creators can also use locked chests for whatever reason they may find necessary.

The steps for making a locked chest are listed below:

  • Open the chat window by pressing the forward slash key.
  • Enter the following command to spawn a locked chest: /setblock ~ ~ ~ chest[facing=west]{Lock:"Chest Key"} replace
  • Enter the following command to obtain a chest key: /give @p tripwire_hook{display:{Name:'{"text":"Chest Key","color":"dark_red","bold":true,"italic":false}'}} 1
  • Additionally, in order to change a regular chest to a locked chest, enter this command: /data merge block ~ ~ ~ {Lock:"Chest Key"}

A locked chest will remain locked if a player tries to open it while holding up an item other than the chest key. A single chest key may be used to open multiple chests.

A chest key and a locked chest (Image via Minecraft)
A chest key and a locked chest (Image via Minecraft)

If a player is holding a chest key in their hand and decides to use it on the locked chest, the chest will open and work just like any other chest. As of now, using commands is the best way to obtain a locked chest or to lock a chest in Minecraft.

For detailed guides, walkthroughs, tips & more, check out SK Minecraft Wiki

Quick Links

Edited by Danyal Arabi
Be the first one to comment