/ban-ip Command in Minecraft Java Edition

Ban IP Targets on a Server

Java EditionServer AdminPermission: Level 3

The /ban-ip command is a server administration tool in Minecraft Java Edition. It lets admins block a specified target with an optional custom reason message.

Server moderators with permission level 3 use this command to enforce rules and manage access. This command has been available since at least Java Edition 1.13 right up to version 26.3.

Syntax (Java 26.3, 1 form)

  1. /ban-ip <target> [<reason>]

The forms you will use most

/ban-ip <target> [<reason>]
Bans the specified text target and optionally includes a custom message explaining the reason.

Arguments

ArgumentTypeWhat it means
<target>textA word or piece of text identifying the target you want to ban.
<reason>messageFree text explaining the ban, which may include target selectors that get replaced by names.

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

Minecraft Bedrock Edition does not have a command with the name /ban-ip, as it is only available in Java Edition.

FAQ

What permission level is needed for /ban-ip?

You need permission level 3, which is the Server admin level, to run the /ban-ip command.

Is the reason argument required in /ban-ip?

No, the <reason> argument is inside square brackets in the syntax, which means it is optional.

Can I use target selectors in the /ban-ip reason?

Yes, the reason argument is a message type that allows selectors, which the game replaces with the matching names.

Related commands

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