/tellraw
Sends a formatted text component message to players. Supports clickable text, hover events, colors, formatting, and score/selector insertion.
Overview
Sends a formatted text component message to players. Supports clickable text, hover events, colors, formatting, and score/selector insertion. In vanilla Minecraft Java Edition it is one of the display commands, first added in 1.7.2.
It is invoked as /tellraw <targets> <message> and accepts 2 required arguments (<targets> and <message>).
Text components can show text, translate, score, selector, keybind and nbt content, styled with color, bold, italic, underlined, strikethrough, obfuscated, insertion, click_event and hover_event. Java 1.21.5 moved the format from JSON to SNBT and renamed the two event keys to snake_case.
The message is a text component, so it supports color, formatting, click_event, hover_event, insertion and live score, selector and nbt values that plain /say and /msg cannot show.
Syntax & Arguments
/tellraw <targets> <message>The full syntax is /tellraw <targets> <message>. Angle brackets < > mark required arguments and square brackets [ ] mark optional ones; a vertical bar | between words means you pick exactly one of those literals. You must always supply <targets> and <message>.
- targets
- Required, of type an entity. The player(s) to send the message to.
- message
- Required, of type a component. A text component defining the message, formatting and interactive parts. Java 1.21.5 switched these from JSON to SNBT, so keys no longer need quotes.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| targets | entity | Required | The player(s) to send the message to. |
| message | component | Required | A text component defining the message, formatting and interactive parts. Java 1.21.5 switched these from JSON to SNBT, so keys no longer need quotes. |
Examples
The 3 examples below are ready to copy and adapt. For instance, /tellraw @a {text:"[Claim reward]",color:"green",click_event:{action:"run_command",command:"trigger reward"},hover_event:{action:"show_text",value:"Click to claim"}} sends a green clickable line. Clicking it runs /trigger reward as that player, which works without op once a trigger objective named reward exists and is enabled for them. Each example varies the arguments to show a different real use of /tellraw; read the note under every snippet to see exactly what changes.
/tellraw @a {text:"[Claim reward]",color:"green",click_event:{action:"run_command",command:"trigger reward"},hover_event:{action:"show_text",value:"Click to claim"}}Sends a green clickable line. Clicking it runs /trigger reward as that player, which works without op once a trigger objective named reward exists and is enabled for them.
/tellraw @a [{text:"Kills: ",color:"white"},{score:{name:"*",objective:"kills"},color:"gold"}]Shows every online player their own score in the kills objective; the name * stands for whoever reads the message.
/tellraw @a {text:"Hello World",bold:true,color:"red"}Sends "Hello World" in bold red text to all players.
Permission Level & Requirements
/tellraw sits at permission Level 2 - Game Master / Cheats, which means it needs permission level 2, the level cheats grant to single-player worlds and that operators hold by default.
In a single-player world you must have "Allow Cheats" turned on (or open the world to LAN with cheats) before it will run; on a multiplayer server the player needs to be an operator at the matching level.
This reference describes the Java Edition 1.21 form of the command; Bedrock Edition may use slightly different argument formats.
Common Mistakes
- Copying a pre-1.21.5 example. clickEvent and hoverEvent are now click_event and hover_event, a run_command click keeps its command in a command field instead of value, and show_text reads its text from value instead of contents.
- Forgetting that a run_command click runs as the player who clicks. They need permission for that command, and commands that send chat messages, such as /say or /tell, are refused.
Notes
Text components can show text, translate, score, selector, keybind and nbt content, styled with color, bold, italic, underlined, strikethrough, obfuscated, insertion, click_event and hover_event. Java 1.21.5 moved the format from JSON to SNBT and renamed the two event keys to snake_case.
Related Commands
If /tellraw is part of your toolkit, the commands below are the ones you will most often reach for alongside it: /title, /msg, /say, and /trigger. They cover closely related tasks, so the links above jump straight to each one.
Frequently Asked Questions about /tellraw
What does the /tellraw command do in Minecraft?
Sends a formatted text component message to players. Supports clickable text, hover events, colors, formatting, and score/selector insertion. It belongs to the display command group and was first added in Java Edition 1.7.2.
What is the correct syntax for /tellraw?
/tellraw <targets> <message>. The required arguments are targets and message.
What permission level does /tellraw need?
It requires permission Level 2 - Game Master / Cheats. On a server the player must be an operator at that level, or have cheats enabled in single-player.
What is a common mistake when using /tellraw?
Copying a pre-1.21.5 example. clickEvent and hoverEvent are now click_event and hover_event, a run_command click keeps its command in a command field instead of value, and show_text reads its text from value instead of contents.
Can you give an example of /tellraw in use?
Yes. /tellraw @a [{text:"Kills: ",color:"white"},{score:{name:"*",objective:"kills"},color:"gold"}]: shows every online player their own score in the kills objective; the name * stands for whoever reads the message.
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting