/xp Command in Minecraft Java Edition

Run Experience Commands with the /xp Alias

Java EditionPlayers & EntitiesPermission: Level 2Bedrock version →

/xp is an alias of /experience: it accepts the same arguments and does the same thing.

The /xp command is a built-in shortcut in Minecraft Java Edition. It acts as an exact alias for the /experience command, doing the exact same thing with less typing.

Players and server operators use this command when they want to manage player experience quickly. Because it requires permission level 2, you must be an operator on a server or have cheats enabled in your single-player world to run it.

Syntax (Java 26.3, 1 form)

  1. /xp → experience …

The forms you will use most

/xp → experience …
Runs the command using the exact same arguments and subcommands that follow the standard experience command.

Examples

Version history

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

  1. 1.13 Already in the game in 1.13, the oldest Java version we track.

Tips

Common mistakes

Java vs Bedrock

Bedrock Edition also includes the /xp command, but it uses a different syntax form: /xp <amount: int> [player: target].

See /xp in Bedrock Edition →

FAQ

What is the difference between /xp and /experience in Java Edition?

There is no difference in how they work; /xp is an alias that does the exact same thing as /experience.

What permission level is needed to use /xp?

You need permission level 2, which means you must be a server operator or have cheats enabled in a single-player world.

How long has the /xp command been in Minecraft Java Edition?

It has been available in every version measured from 1.13 all the way up to the newest version, 26.3.

Related commands

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