/xp Command in Minecraft Bedrock Edition

Add or Remove Player Experience in Bedrock

Bedrock EditionPlayers & EntitiesPermission: Game DirectorsCheats: YesJava version →

The /xp command in Minecraft Bedrock Edition lets you add or remove player experience. It requires cheats to be enabled and a Game Directors permission level to run.

Players and server administrators use this command to quickly grant experience for testing, reward players in custom maps, or deduct experience as a penalty.

Syntax (2 forms)

  1. /xp <amount: int> [player: target]

    Add XP

  2. /xp <amount: int> [player: target]

    Remove XP

Arguments

ArgumentTypeWhat it means
amountintAn `integer` of the experience to add to the player. May only be negative to remove xp.
playertargetA player name `string` or `target selector` to identify the player who should receive or lose xp.

Examples

Tips

Common mistakes

Bedrock vs Java

In Minecraft Java Edition, the equivalent command is /experience, which uses subcommands like /experience add <target> <amount> [points|levels] and /experience query <target> levels, and places the target selector before the amount.

See /xp in Java Edition →

FAQ

How do you remove experience in Bedrock Edition?

You can remove experience by typing a negative integer for the amount argument, such as /xp -50 @p.

Why is the /xp command not working in my world?

The /xp command requires cheats to be enabled in your world settings and your account must have the Game Directors permission level.

Can I give experience to multiple players at the same time?

Yes, you can use a target selector like @a in the player argument spot to add or remove experience for all players at once.

Related commands

/aimassist/camera/camerashake/clearspawnpoint/controlscheme/damage/effect/event/gamemode/hud/inputpermission/kill/ride/spawnpoint/spreadplayers/summon