Skip to content
MC Command Generator

/xp Command Generator

Beta

Add or take levels or points, set them to an exact number, or read them back. The generator writes /experience on modern Java and xp <amount>L elsewhere, and the preview shows the experience bar.

Describe it — AI writes the command

Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.

Checking the AI…

Paste a command— edit it here or move it to another version

Java 1.13+ writes /experience (xp is the same command). Points can't go past the current level's bar when set.

22
Starting from level 12: now level 22.

Your command · Java 26.3

28 characters
/experience add @p 10 levels

Raw editor

How it works

The command looks different in each edition, which is why copied commands often fail.

Java 1.13 and later

experience add @p 10 levels
experience add @p -50
experience set @a 0 levels
experience query @s points

xp is an alias of experience. Points are the default unit; negative amounts take away.

Bedrock and Java 1.8 to 1.12

xp 10L @p
xp 50 @p
xp -5L @p

An L after the number means levels. Points can't be negative, and there is no set or query. To set levels the generator writes two lines: take every level away (xp -24791L on Bedrock), then add the new amount.

FAQ

How do I give myself levels?

Java 1.13+: experience add @s 30 levels. Bedrock: xp 30L @s.

How do I reset someone's experience to 0?

Java 1.13+: experience set @p 0 levels and experience set @p 0 points. Bedrock: xp -24791L @p takes every level away.

Why does xp -10 give an error?

On Bedrock and old Java you can't take points away — only levels. Write xp -10L, or use experience add @p -10 on Java 1.13+.

Can I check how many levels a player has?

On Java 1.13+: experience query <player> levels. Store it in a scoreboard with execute store result score … run experience query @s levels. Bedrock has no query.

What's the difference between levels and points?

Points fill the green bar; a full bar becomes a level. Higher levels need more points, so 100 points is several levels at level 0 but less than one at level 30.