Experience points (XP) are essential for repairing gear, enchanting items, and naming mobs. Whether you want to instantly grant levels using cheats or build a permanent source of experience like a How to Build XP Farm, spawning or gathering XP quickly is straightforward in both Minecraft Java and Bedrock Edition.
Enabling cheats in Bedrock Edition permanently disables Xbox Achievements or PlayStation Trophies for that specific world file.
Enable Cheats in Your World
To spawn XP using commands, you must have cheats enabled. If you are creating a new world, open the World Settings and toggle Allow Cheats to ON.
If you are playing on an existing Java Edition world, press Esc, click Open to LAN, and select Allow Cheats: ON before starting the local network world.
Open the Chat Window
Once your world has cheats enabled, press the T key on Java Edition, the right directional pad button on consoles, or tap the chat icon at the top of the screen on mobile devices to open the game chat.
Use the Experience Command (Java Edition)
If you are playing Minecraft Java Edition, type the command /xp add @s 50 levels to add fifty experience levels to your character. You can replace 50 with any number or change levels to points if you want to add specific point values instead.
Use the Experience Command (Bedrock Edition)
If you are playing Minecraft Bedrock Edition on Windows, Xbox, PlayStation, Nintendo Switch, or mobile, type the command /addexperience @s 50L to give yourself fifty levels. Replace the number and use P instead of L if you prefer adding individual points.
Build an Automated XP Farm for Survival Mode
If you prefer not to use cheats, you can spawn and collect XP naturally by building automated structures. Follow our guide on How to Build XP Farm to set up mob spawners, furnace arrays, or trading halls that generate massive amounts of experience safely.
Frequently Asked Questions
Can I give XP to other players using commands?
Yes. Instead of using @s (which targets yourself), type another player's exact username or use multiplayer selectors like @p for the nearest player or @a for all players.
What is the maximum XP level you can reach?
The experience counter technically has no hard limit, but reaching level 2,147,483,647 is the maximum integer limit before the game overflows and resets your experience back to zero.




















