OGTOOLS

Minecraft /experience command

Adds or removes XP points or whole levels for a player, or checks the current value.

🧍 Player commands Operator (level 2) Needs cheats enabled Java Edition 26.3 Short form: /xp

Syntax

/xp add <targets> <amount> [points|levels]
/xp set <targets> <amount> [points|levels]
/xp query <target> (points|levels)

Parts in square brackets are optional, parts in angle brackets are required. You do not type the brackets: Put your own value in their place.

Arguments

ArgumentWhat it does
points Raw experience points (the green bar).
levels Number of levels (the number above the bar).

Examples

/xp add @s 30 levels

Gives you 30 levels, more than enough for an enchanting table.

/xp set @s 0 levels

Resets your level to zero.

/xp query Faruk levels

Shows how many levels Faruk has.

Good to know

  • xp and experience are the same command.
  • You can also lower levels by giving a negative value.

How do I run this command?

Press T in game to open chat (or press / directly), type the command and press Enter. While typing, Tab completes the options. This command counts as a cheat: It needs cheats enabled in a singleplayer world, and operator permission on a server (operator (level 2)).

Related commands

🧍 More Player commands

Another tool Minecraft crafting recipes Would rather make the item than give it with a command? See the recipe on the 3x3 grid.

Minecraft is a product of Mojang Studios. This tool is an independent helper made for players and is not affiliated with Mojang or Microsoft.