Send Formatted Chat Messages to Players
The /tellraw command sends a custom chat message to one or more players using a JSON or SNBT text component. Unlike regular chat commands, it transmits the raw text directly without adding your player name at the front.
Map makers and server operators use this command to create colored announcements, custom dialogue, and system alerts. You need permission level 2 (operator status or cheats enabled in single-player) to run it.
/tellraw <targets> <message>/tellraw <targets> <message>| Argument | Type | What it means |
|---|---|---|
<targets> | target selector players only | Specifies the players who will see the message using a player name, a UUID, or a target selector like @p, @a, or @s. |
<message> | text component | Defines the message content using a JSON or SNBT text component, such as {"text":"Hello","color":"gold"}. |
/tellraw @a {"text":"Welcome to the server!"}Sends a plain white welcome message to all players online.
/tellraw @p {"text":"Hello","color":"gold"}Displays a gold-colored greeting to the nearest player.
/tellraw @s {"text":"Quest completed!","color":"green"}Shows a green notification to the player who ran the command.
/tellraw Steve {"text":"Your base is under attack!","color":"red"}Sends a red warning message directly to a specific player named Steve.
/tellraw @a[distance=..15] {"text":"Boss arena entered.","color":"dark_purple"}Sends a dark purple alert to all players within 15 blocks.
/tellraw @a[gamemode=adventure] {"text":"Find the hidden key.","color":"aqua"}Gives an aqua hint only to players who are currently in Adventure mode.
/tellraw @p[team=Blue] {text:"Defend the flag!",color:"blue"}Uses SNBT text format without quotes on the keys to alert the closest player on the Blue team.
Measured from the game files of every Java release from 1.13 to 26.3.
Bedrock Edition also includes the /tellraw command with a similar structure: /tellraw <target: target> <raw json message: json>.
Only players with permission level 2 (operators on a server, or players with cheats turned on in single-player) and command blocks can use /tellraw.
No, the <targets> argument only accepts players, so targeting mobs or other non-player entities will not work.
Add the color key inside your text component, such as {"text":"Hello","color":"gold"}, to display the text in that color.