/tellraw

Not to be confused with Commands/msg or Commands/say.
This article is about the command that sends JSON messages. For the command to whisper, see Commands/tell.
/tellraw
Permission level
required
  • 2 ‌[JE only]
  • 1 ‌[BE only]
Restrictions

None

Sends a JSON message to players.

Syntax

  • Java Edition
tellraw <targets> <message>
  • Bedrock Edition
tellraw <target: target> <raw json message: json>

Arguments

JE<targets>: entity
BE: target: target: CommandSelector<Player>

Specifies the player(s) to send the message to.
Must be a player name, a target selector or a UUID[Java Edition only]. And the target selector must‌[JE only]/should‌[BE only] be of player type. In Bedrock Edition, the target selector should be of player type.

JE<message>: component
BE: raw json message: json: Json::Value

Specifies the message to send.
In Java Edition, must be a valid text component. In Bedrock Edition, must be a JSON [NBT Compound / JSON Object]Object.

Result

CommandTriggerJava EditionBedrock Edition
AnyThe command is incomplete, or any argument is not specified correctly. Unparseable Unparseable
raw json message: json is not a raw JSON text. N/A Failed
player: target is a target selector that is not in player type.
<targets> or player: target fails to resolve to one or more online players. Failed
OtherwiseSuccessful

Output

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
AnyJava EditionOn fail000
On success11the number of targeted players
Bedrock EditionOn fail0N/AN/A
On success1N/AN/A

Examples

This section would benefit from the addition of more images.
 
Please remove this notice once you have added suitable images to the article.
Java Edition Bedrock Edition Preview
To send the message "Hello" in chat: /tellraw @a "Hello" /tellraw @a {"rawtext":[{"text":"Hello"}]} Hello
To send the message "I am blue" colored blue in chat: /tellraw @a {"text":"I am blue","color":"blue"}

/tellraw @a {text:"I am blue",color:blue}

/tellraw @a {"rawtext":[{"text":"§bI am blue"}]} I am blue (In blue)
To send the message "Hover me!" in chat, which displays the text "Hi!" when hovered over: /tellraw @a {text:"Hover me!",hover_event:{action:show_text,value:"Hi!"}} Hover me! (Hovered: Hi!)
To send the message-colored dark red in chat: /tellraw @a {text:"Y0U G3T B4CK H3R3 N0W",color:dark_red}

/tellraw @a {"text":"Y0U G3T B4CK H3R3 N0W","color":"dark_red"}

/tellraw @a {"rawtext":[{"text":"§4Y0U G3T B4CK H3R3 N0W"}]} Y0U G3T B4CK H3R3 N0W (Dark red)
Use '\n' to insert a new line: /tellraw @a {text:"Text1\nText2"}

/tellraw @a {"text":"Text1\nText2"}

/tellraw @a {"rawtext":[{"text":"Text1\nText2"}]} Text1 (newline) Text2
Use '\uE100' to insert a hunger bar emoji: /tellraw @a {"rawtext":[{"text":"Text1\uE100Text2"}]}
Display a message in the Enchanting Table's glyphs: /tellraw @a {text:"Hello World",font:alt}

/tellraw @a {"text":"Hello World","font":"alt"}

⍑ᒷꖎꖎ𝙹 ∴𝙹∷ꖎ↸
Display a message in the illager runes: /tellraw @a {"text":"Hello World","font":"illageralt"}

/tellraw @a {text:"Hello World",font:illageralt}

Hello World (illager runes)
Display a translated string: /tellraw @p {"translate":"item.minecraft.diamond"}

/tellraw @p {translate:item.minecraft.diamond}

/tellraw @s {"rawtext":[{"translate":"item.diamond.name"}]} Diamond
Simulate the output of /say @p loves Minecraft!, run through a command block: /tellraw @a {"translate":"chat.type.announcement","with":[{"text":"@"},[{"selector":"@p"},{"text":" loves Minecraft!"}]]}

History

For changes to the raw JSON text used by this command, see Raw JSON text format § History.

Java Edition

Java Edition
1.7.213w37aAdded /tellraw.
1.21.525w02aText Components are now specified with SNBT instead of JSON.

Bedrock Edition

Bedrock Edition
1.9.0beta 1.9.0.0Added /tellraw.

See also

  • /say — send a plain text message to all players
  • /tell — send a plain private text message to specific players

External links

Navigation