You run the command and attach your camera to the target. Your view becomes the entity's view, including mob vision shaders.
Any single entity works: mobs, players, armor stands, even dropped items. To pick a mob, choose @e, set Type in the selector arguments and set limit to 1; the target slot only accepts one entity. You can also type a player's name.
Run as the player who wants to spectate. They must already be in spectator mode; copy the gamemode command below first.
/spectate fails unless you are already in spectator mode. Run this first, then the spectate command.
The spectating player must already be in spectator mode or the command fails. /spectate attaches the camera; it does not change gamemodes.
Operators, command blocks and datapack functions can run it. In singleplayer, cheats must be enabled.
The target slot takes a single entity, and a player can never spectate themselves.
Heads up: spectating certain mobs changes how the world is rendered. Creepers tint everything green, spiders see through five blurred lenses, and endermen invert every color. That is the mob's built-in vision shader, not a bug; detach to see normally again.
/spectate attaches a spectator-mode player's camera to another entity, so they see the world exactly as that mob or player sees it, vision shaders included. Added in Java Edition 1.15, it is the command version of left-clicking an entity in spectator mode, plus two things clicking cannot do: target an entity precisely with a selector, and force another player to spectate something.
The command has three forms. Bare /spectate stops spectating and returns you to your own body. /spectate <target> attaches your own camera to the target, and /spectate <target> <player> attaches the named player's camera instead, which is what makes spectating scriptable from command blocks and the server console. All three forms need permission level 2: an operator, a command block or a datapack function.
The one rule people trip over is that the spectating player must already be in spectator mode. /spectate never changes anyone's gamemode; it only moves the camera. Run /gamemode spectator first (the generator above gives you that command too), then the spectate command, and switch back with /gamemode survival or creative when you are done.
The syntax has not changed since /spectate was added in 1.15, so the same generated command works in every Java version from 1.15 to the current release.
Copy any of these as a starting point, or rebuild them in the generator above:
/spectate @e[type=ender_dragon,limit=1]Attaches your camera to the ender dragon, so you fly the fight from the dragon's point of view./spectate @e[type=creeper,limit=1,sort=nearest]Spectates the nearest creeper, complete with the green creeper vision shader./spectate SteveSees through the player Steve's eyes, the classic way to follow one player during an event./spectate @e[type=warden,limit=1] AlexMakes the player Alex spectate the nearest warden. Runs from the console or a command block because the spectator is named./spectateStops spectating and returns you to your own body. Same effect as pressing the sneak key.Spectator mode is the gamemode /spectate is built on: a spectator is invisible, flies through blocks, and cannot interact with the world. Get into it with /gamemode spectator, or put another player there with /gamemode spectator <player>. Only then does /spectate have a camera it is allowed to move; run it from survival or creative and it simply fails with an error.
Once attached, you are locked to the entity: it steers, you watch. Through a mob's eyes you inherit its full perspective, including night vision where the mob has it and the special shaders for creepers, spiders and endermen. Detach at any time by pressing the sneak key or running the bare /spectate, and leave spectator mode entirely with /gamemode survival. For map makers this trio (gamemode, spectate, gamemode back) is the standard recipe for cutscenes, kill cams and follow-the-leader minigames.
The two usual causes are gamemode and permissions. The spectating player must already be in spectator mode (/gamemode spectator) before /spectate runs, and the command needs permission level 2, so cheats must be enabled in singleplayer or you must be an operator on a server. Beyond that, the target slot accepts exactly one entity, so @e and @a selectors fail unless you add limit=1, and a player can never spectate themselves.
Press the sneak key (Shift by default) and your camera detaches from the entity and returns to your own spectator body. Running /spectate with no arguments does exactly the same thing, which is the form to use in command blocks or functions that should release a spectating player.
Yes. The two-argument form /spectate <target> <player> attaches the named player's camera to the target, so it works from the server console, command blocks and datapack functions. The spectating player still has to be in spectator mode, so put them there first with /gamemode spectator <player>.
Java Edition 1.15, in snapshot 19w41a. Before that, a player in spectator mode could only attach to an entity by left-clicking it; there was no command to do it, no way to do it for another player, and no way to script it. The syntax has not changed since 1.15, so commands from this generator work in every version from 1.15 to the current release.
No. Bedrock Edition has spectator mode, but it has no /spectate command, and Bedrock spectators cannot attach their camera to entities at all. The commands on this page are for Java Edition 1.15 and later only.
Some mobs come with a built-in vision shader that applies whenever you see through their eyes. Creepers tint the whole world green and pixelated, spiders split the view into five blurred lenses, and endermen invert every color. That is intentional, and it goes away as soon as you detach by sneaking or running /spectate with no arguments.
Need the gamemode side of the setup, or more Minecraft tools: