/effect Command in Minecraft Java Edition

Give and Clear Status Effects on Players and Mobs

Java EditionPlayers & EntitiesPermission: Level 2Bedrock version →

The /effect command lets you add or remove status effects on players and other entities in Minecraft Java Edition. You can control which effect is applied, how long it lasts in seconds, how strong it is, and whether the floating particles are visible.

Players and server operators use this command to test mob effects in creative worlds, build custom adventure maps, or remove unwanted effects without needing milk or potions. You need operator permissions (level 2) or cheats enabled in single-player to run it.

Syntax (Java 26.3, 7 forms)

  1. /effect clear
  2. /effect clear <targets> [<effect>]
  3. /effect give <targets> <effect>
  4. /effect give <targets> <effect> <seconds>
  5. /effect give <targets> <effect> <seconds> <amplifier> [<hideParticles>]
  6. /effect give <targets> <effect> infinite
  7. /effect give <targets> <effect> infinite <amplifier> [<hideParticles>]

The forms you will use most

/effect clear
Removes all active status effects from yourself.
/effect clear <targets> [<effect>]
Removes all effects, or one specific effect if chosen, from the selected targets.
/effect give <targets> <effect>
Gives a status effect to the selected targets using the default duration and strength.
/effect give <targets> <effect> <seconds>
Gives a status effect to the targets for a specific number of seconds.
/effect give <targets> <effect> <seconds> <amplifier> [<hideParticles>]
Gives a status effect with a custom duration in seconds, a custom strength level, and an optional setting to hide particles.
/effect give <targets> <effect> infinite
Gives a status effect that lasts forever until it is cleared or the target dies.
/effect give <targets> <effect> infinite <amplifier> [<hideParticles>]
Gives a permanent status effect with a custom strength level and an optional setting to hide particles.

Arguments

ArgumentTypeWhat it means
<targets>target selectorSpecifies the player or entity to affect using a player name, a UUID, or a target selector like @p, @a, @e, or @s.
<effect>registry entry
mob effect
Selects the mob effect registry entry to apply or remove.
<amplifier>whole number
0 to 255
Sets the strength level of the effect using a whole number from 0 to 255, where 0 is the base level.
<hideParticles>true / falseControls whether effect particles are hidden by setting it to true or false.
<seconds>whole number
1 to 1000000
Sets how many seconds the effect lasts, using a whole number from 1 to 1000000.

Examples

Effect Command GeneratorGive or clear status effects with duration, level and hidden particles.Open generator →

Version history

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

  1. 1.19.4 Syntax changed.
    + /effect give <targets> <effect> infinite+ /effect give <targets> <effect> infinite <amplifier> [<hideParticles>]
  2. 1.15 Syntax changed.
    + /effect clear
  3. 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, the command skips the word give and places the target selector right after /effect, using the syntax /effect <player: target> clear [effect: Effect] or /effect <player: target> <effect: Effect> [seconds: int] [amplifier: int] [hideParticles: Boolean].

See /effect in Bedrock Edition →

FAQ

How do I give an infinite effect in Minecraft Java Edition?

In Java Edition 1.19.4 and newer, replace the seconds number with the word infinite, such as /effect give @s night_vision infinite.

How do I hide the swirling particles from an effect?

Add true at the very end of the command after setting both the duration and the amplifier, like /effect give @s speed 60 0 true.

What is the maximum amplifier level for the /effect command?

The <amplifier> argument accepts any whole number from 0 up to a maximum of 255.

Related commands

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