THESPIKE.GG
THESPIKE
    EN
    Login
    EN
    1. Home
    2. MINECRAFT
    3. Minecraft Beginner's Guide
    4. How to turn on keep inventory in Minecraft

    How to turn on keep inventory in Minecraft

    ON THIS PAGE:

    • What is keep inventory?
    • How to turn on keep inventory
    • How to check or turn off keep inventory
    • Why is the Minecraft keep inventory command not working?
    keep inventory minecraft
    Written By Onur Demirkol

    (Content Writer)

    Reviewed by: Naim Rosinski

    (Content Manager & Editor)

    Last UpdatedJuly 29, 2026 at 07:32PM
    Share On
    Share On

    One of the scariest things in Minecraft’s survival mode is dying, expectedly or unexpectedly. Because when you die, you literally start from scratch, as you lose all your inventory. What if we told you there is a way to bypass that? Keep Inventory removes much of the risk that comes with death. You keep your equipment and experience after respawning, which makes long mining trips and dangerous areas less stressful. Here is how to enable it!

    What is keep inventory?

    Keep Inventory is a Minecraft game rule that controls what happens to your items when you die. Minecraft normally drops your inventory at the place where your character died. You then need to return before the items disappear, or another player collects them.

    When Keep Inventory is active, your items stay with your character after death. You still return to your bed, Respawn Anchor, or world spawn as normal. The rule only changes what happens to your items and experience.

    Keep Inventory can protect:

    • Items in your main inventory
    • Items in your hotbar
    • Equipped armor
    • Your off-hand item
    • Experience points and levels

    How to turn on keep inventory

    The Minecraft keep inventory command changes between Java and Bedrock Edition. Make sure you use the correct capital letters for the version you play.

    How to turn on keep inventory in Minecraft Java Edition

    Java Edition players should use this command:

    /gamerule keepInventory true

    Follow these steps:

    1. Open your Minecraft world.
    2. Press T to open the chat window.
    3. Type /gamerule keepInventory true.
    4. Press Enter.
    5. Check the chat for a confirmation message.
    Type the code you see above to turn the Keep Inventory feature on in Minecraft (Image Credit: GuideRealm on YouTube)
    Type the code you see above to turn the Keep Inventory feature on in Minecraft (Image Credit: GuideRealm on YouTube)

    The capital I in keepInventory is important in Java Edition. Copy the command exactly if Minecraft reports an error.

    You also need command permission. Players can activate cheats while creating a world. In an existing single-player world, open the pause menu and select:

    Open to LAN > Allow Cheats: On > Start LAN World

    You do not need to invite another player. This option gives you temporary command access until you leave the world. The Keep Inventory setting remains active after you close and reopen the save.

    Players who want to learn other shortcuts can check the full Minecraft commands guide.

    In Java Edition, make sure to turn on cheats before typing the code (Image Credit: GuideRealm on YouTube)
    In Java Edition, make sure to turn on cheats before typing the code (Image Credit: GuideRealm on YouTube)

    How to turn on keep inventory in Minecraft Bedrock Edition

    Bedrock Edition covers Xbox, PlayStation, Nintendo Switch, mobile devices, and the Bedrock version on Windows.

    You can activate Keep Inventory from the settings menu:

    1. Open the world or select its edit button.
    2. Open Settings.
    3. Go to the Game section.
    4. Find the Cheats options.
    5. Turn on Activate Cheats.
    6. Switch on Keep Inventory.
    You can easily turn on the feature in the settings (Image Credit: GuideRealm on YouTube)
    You can easily turn on the feature in the settings (Image Credit: GuideRealm on YouTube)

    The names and menu positions may look slightly different after an update, but Keep Inventory usually appears with the other cheat and world rule settings.

    You can also enter this command in chat:

    /gamerule keepinventory true

    Bedrock uses the lowercase keepinventory format in its command documentation. The command sets the rule to a Boolean value, so true turns it on and false turns it off.

    How to check or turn off keep inventory

    You can check the rule by entering the command without true or false:

    • Java: /gamerule keepInventory
    • Bedrock: /gamerule keepinventory

    Minecraft should show the current value in chat.

    To turn Keep Inventory off, change the value to false:

    • Java: /gamerule keepInventory false
    • Bedrock: /gamerule keepinventory false

    The normal death system returns at once. Any player who dies after that point will drop carried items and lose experience.

    Why is the Minecraft keep inventory command not working?

    The command usually fails because of permissions or incorrect spelling.

    Cheats are not active

    Enable commands when creating the world. Java players can also use Open to LAN, while Bedrock players can activate cheats through the Game settings.

    You do not have operator permission

    Regular server and Realm members cannot change world rules. Ask the owner or an operator to enter the command.

    You used the wrong command format

    Java uses keepInventory with a capital I. Bedrock documentation lists keepinventory in lowercase.

    You changed a different world

    Game rules stay with the world where you entered them. Turning Keep Inventory on in one save does not change your other worlds, servers, or Realm slots.

    Check out more of our Minecraft pieces:

    • How to change skin in Minecraft (Java, Bedrock, PC, and Console)
    • How to TP in Minecraft: Teleportation explained (Coordinates, Villages, Death Location)
    • How to tame Parrots in Minecraft: Seeds, advantages, and more
    • Smelting in Minecraft: A complete guide to furnaces, fuels, and efficiency tips for 2025
    • Minecraft enchanting table recipe, setup, language & everything you need to know

    Featured Image Credit: Mojang

    Guide Categories

    • Armor Trims
    • Beginners Guide
    • House Ideas
    • All Recipes
    • Villagers Guide
    • Enchantments
    • Minecraft Mobs
    • Best Seeds

    All Related Guides

    • tropical fish
      How to breed tropical fish in MinecraftCan you breed tropical fish in Minecraft? Here is the clear answer, plus how to catch, move, and use tropical ...
    • Minecraft Chaos Cubed
      Minecraft Chaos Cubed guide: Everything new in the 2026 updateExplore everything new in Minecraft Chaos Cubed, including Sulfur Caves, Sulfur Cubes, geysers, new blocks, co...
    • render distance minecraft
      How to change render distance in MinecraftChange render distance in Minecraft with simple steps for Java and Bedrock, plus tips to balance better visibi...
    • How to grow mangrove trees in Minecraft
      How to grow mangrove trees in MinecraftFind out how to grow mangrove trees in Minecraft with simple steps, growth requirements, farming tips, and com...
    • mc name tag
      How to craft a name tag in MinecraftLearn how to craft a name tag in Minecraft, how to use it with an anvil, and why it matters for pets, mobs, an...
    • water elevator
      Here is how to make a water elevator in MinecraftHere’s how to make a water elevator in Minecraft, including the materials you need and why your bubble column ...
    • New Minecraft capes
      New Minecraft capes alert: How to get the Crafter and Builder CapesMinecraft Crafter and Builder Capes guide: unlock requirements, TwitchCon rewards, Minecraft LIVE details, and...
    • getsockopt
      What is the “getsockopt” error in Minecraft and how to fix itFix the getsockopt Minecraft error with simple checks for firewall, server address, DNS, LAN settings, and con...
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    Onur Demirkol

    Onur Demirkol here, content writer for THESPIKEGG. I have been around for a very long time now, you may have seen me in the comments.

    I started writing here in 2021, but my first gig was back in 2018. That was when I realized people actually get paid to write about games. I’ve written thousands of articles for different media outlets, led teams, and conducted interviews with players.

    When I’m not behind the keyboard, I’m watching Galatasaray, following the NBA, or pretending I’m still good at basketball. I also work full-time at AnyDesk, writing serious things in not-so-serious ways.

    If you want to reach out, feel free to contact me on X, LinkedIn, take a look at my work at MuckRack or send me an email at [email protected].

    View More
    THESPIKE
    AboutCareersPrivacy PolicyTerms of UseAbout THESPIKEDisclaimer
    Contact UsCommercialsSend an emailPost Feedback
    ResourcesBetting SitesOnline CasinosSweepstakes Casinos
    © 2026 THESPIKE.GG | All Rights Reserved | Not affiliated with Riot Games
    18+ Bet Responsibly | BeGambleAware.org
    Light Mode
    Login