Updated:

The simplest form

# Java
/tellraw @a {"text":"Game start!","color":"gold","bold":true}
# Bedrock
/tellraw @a {"rawtext":[{"text":"§6§lGame start!"}]}

Java sets color and style as fields. Bedrock puts formatting codes that start with § inside the text.

Colors

Java color nameBedrock codeColor
red§cRed
gold§6Gold
yellow§eYellow
green§aGreen
aqua§bAqua
blue§9Blue
light_purple§dPink
white§fWhite
gray§7Gray

Java also accepts hex colors such as "color":"#FF8800". On Bedrock, §l is bold and §r resets formatting.

Different colors in one message

On Java, list several parts in square brackets. The empty "" at the start stops the first part's style from carrying over to the rest.

/tellraw @a ["",{"text":"[Notice] ","color":"yellow"},{"text":"The boss has appeared","color":"red"}]

Player names and scores

# Java
/tellraw @a ["",{"selector":"@p"},{"text":" has coins: "},{"score":{"name":"@p","objective":"money"}}]
# Bedrock
/tellraw @a {"rawtext":[{"selector":"@p"},{"text":" has coins: "},{"score":{"name":"@p","objective":"money"}}]}

Create the objective first with /scoreboard objectives add money dummy. The scoreboard guide explains objectives step by step.

Clickable text (Java)

Clicking the text can run a command or open a URL. The field names changed in Java 1.21.5.

# 1.21.5 and later
/tellraw @p {"text":"[Click to warp]","color":"aqua","click_event":{"action":"run_command","command":"/trigger warp"}}
# 1.21.4 and earlier
/tellraw @p {"text":"[Click to warp]","color":"aqua","clickEvent":{"action":"run_command","value":"/trigger warp"}}

Players who are not operators can still use /trigger, so pair click text with it (see the trigger guide). Bedrock tellraw has no click actions.

Tellraw or title?

Use /title for big text in the middle of the screen. Tellraw stays in the chat history, so it suits rules, hints and logs. The title and tellraw guide compares the two.

Common questions

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.