/op Command in Minecraft Java Edition

Grant Operator Status to Players

Java EditionServer AdminPermission: Level 3Bedrock version →

The /op command is used in Minecraft Java Edition to grant operator status to one or more players on a server. You need permission level 3 (Server admin) to run this command.

Server administrators use this command when they want to give trusted friends or staff members access to administrative privileges. It accepts either an exact player name or a target selector that matches players.

Syntax (Java 26.3, 1 form)

  1. /op <targets>

The forms you will use most

/op <targets>
Grants operator status to the specified player or players matched by a target selector.

Arguments

ArgumentTypeWhat it means
<targets>playerSpecifies the player name or a target selector that matches the players who will receive operator status.

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 /op command, where it uses the syntax /op <player: target> to grant operator status to a target player.

See /op in Bedrock Edition →

FAQ

What permission level is needed to use /op?

You need permission level 3, which is for server admins, to run the /op command in Minecraft Java Edition.

Can I use target selectors with the /op command?

Yes, the <targets> argument accepts both direct player names and any target selector that matches players.

Which Java Edition versions support the /op command?

The /op <targets> command has been available in every Java Edition release from version 1.13 up to version 26.3.

Related commands

/ban/ban-ip/banlist/datapack/deop/fetchprofile/kick/list/pardon/pardon-ip/publish/reload/save-all/save-off/save-on/setidletimeout

More on 9Minecraft