/experience Command in Minecraft Java Edition

Add, Set, or Query Player Experience

Java EditionPlayers & EntitiesPermission: Level 2Bedrock version →

The /experience command lets you change or check how much experience a player has in Minecraft Java Edition. You can work with either full experience levels or individual experience points.

Players and server operators use this command to test mechanics, reward players on multiplayer servers, or check someone's current progress. You need permission level 2 (cheats enabled in single-player or operator status on a server) to run it.

Syntax (Java 26.3, 8 forms)

  1. /experience add <target> <amount>
  2. /experience add <target> <amount> levels
  3. /experience add <target> <amount> points
  4. /experience query <target> levels
  5. /experience query <target> points
  6. /experience set <target> <amount>
  7. /experience set <target> <amount> levels
  8. /experience set <target> <amount> points

The forms you will use most

/experience add <target> <amount>
Adds a specific amount of experience to the target player.
/experience add <target> <amount> levels
Adds or subtracts a whole number of experience levels for the target player.
/experience add <target> <amount> points
Adds or subtracts a specific number of experience points for the target player.
/experience query <target> levels
Checks and displays the current experience level of the selected player.
/experience query <target> points
Checks and displays the current experience points of the selected player.
/experience set <target> <amount>
Sets the target player's experience to an exact whole number.
/experience set <target> <amount> levels
Sets the target player's experience levels to an exact whole number.
/experience set <target> <amount> points
Sets the target player's experience points to an exact whole number.

Arguments

ArgumentTypeWhat it means
<target>target selector
players only
The player you want to affect, written as a player name, a UUID, or a target selector (players only) like @p, @a, @e, or @s.
<amount>whole numberA whole number, such as 5 or -3, indicating how much experience to add or set.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.21.2 Only argument names changed (same forms).
    + /experience add <target> <amount>+ /experience add <target> <amount> levels+ /experience add <target> <amount> points+ /experience query <target> levels+ /experience query <target> points+ /experience set <target> <amount>− /experience add <targets> <amount>− /experience add <targets> <amount> levels− /experience add <targets> <amount> points− /experience query <targets> levels− /experience query <targets> points− /experience set <targets> <amount>and 4 more
  2. 1.13 Already in the game in 1.13, the oldest Java version we track.

Tips

Common mistakes

Java vs Bedrock

In Minecraft Bedrock Edition, players can use the shorter /xp command instead, which uses the syntax /xp <amount: int> [player: target] and puts the amount before the target player.

See /xp in Bedrock Edition →

FAQ

How do I take away experience levels from a player?

Use the /experience add command with a negative whole number, such as /experience add @p -5 levels.

What permission level do I need to use /experience?

You need permission level 2, which means cheats must be turned on in single-player or you must be an operator on a multiplayer server.

Did the /experience command change in recent versions?

Yes, the command has been available since at least Java Edition 1.13, and in version 1.21.2 the syntax updated its argument formatting from <targets> to <target>.

Related commands

/advancement/attribute/damage/defaultgamemode/effect/gamemode/kill/ride/rotate/spawnpoint/spectate/spreadplayers/summon/swing/teleport/tp