Skip to main content
The Minecraft Web Client provides several built-in commands that can be executed in the game chat or browser console.

Built-in Chat Commands

These commands are available in the in-game chat when playing in singleplayer mode or hosting a world.

Export/Download World

/export
command
Export the currently loaded world as a ZIP file. The world is automatically saved before export.Aliases: /downloadExample:
/export
The world is first saved to browser memory, then packaged into a ZIP file that will be downloaded to your device.

Publish/Share World

/publish
command
Open your singleplayer world to the internet via P2P connection. Creates a shareable join link that is automatically copied to your clipboard.Aliases: /shareExample:
/publish
This uses peer-to-peer networking. Your connection information will be shared with players who join.

Close P2P Connection

/close
command
Close the P2P connection and stop allowing other players to join your world.Example:
/close

Manual Save

/save
command
Manually save the current world to browser memory. Useful when auto-save is disabled.Example:
/save
After saving, you’ll see a confirmation message: “Saved to browser memory”

Get Position

/pos
command
Copy your current position to clipboard. Supports both player position and block position.Arguments:
  • block - Get the position of the block you’re looking at (optional)
Examples:
/pos
/pos block
The position is formatted as: X Y Z with 2 decimal places.

Download Mesher Log

/mesherlog
command
Download performance logs from the chunk mesher workers. Useful for debugging rendering performance.Example:
/mesherlog
This command is available in both singleplayer and multiplayer modes.

Console Debug Functions

These functions are available in the browser console (F12) for advanced debugging.

Debug Toggle

debugToggle
Enables all debug messages. Warning: This will start packet spam in the console.
Instead of enabling all debug messages, consider using options.debugLogNotFrequentPackets to filter packet spam.

Debug Top Packets

debugTopPackets
Use with JSON.stringify() to see what packets were received/sent by name. Example:
JSON.stringify(debugTopPackets)

Debug Changed Options

debugChangedOptions
See what options have been changed from their default values. Don’t change options directly here - use the options object instead.

Debug Scene Chunks

debugSceneChunks
Similar to world.sectionObjects, but shows chunks relative to your current position (e.g., 0,0 is the current chunk).

Debug Server/Client Packet Names

debugServerPacketNames
debugClientPacketNames
Get all available packet names for the current server version.

Availability

  • Commands marked as alwaysAvailable work in both singleplayer and multiplayer
  • Commands without this flag only work in singleplayer mode
  • /pos and /mesherlog are available in all modes
  • World management commands (/export, /save, /publish) only work in singleplayer

See Also

Build docs developers (and LLMs) love