
The /tellraw command lets you broadcast custom, formatted messages to players without displaying a sender name in the chat window. Whether you are building a single-player adventure map or running a multiplayer server, mastering JSON text components gives you full control over colors, styles, and interactive chat prompts.
Every tellraw command follows a straightforward structure consisting of the command name, a target, and your JSON message payload.
/tellraw <targets> <message>Before writing your JSON message, you must choose who will see it using a player name or a target selector:
@a sends the message to all online players.@p targets the nearest player to the command execution point.@s sends the message to the entity or player executing the command.@r selects a random online player.Important limitation: The standard Minecraft chat input box is strictly limited to 256 characters. While short test messages work fine in chat, complex JSON strings with multiple colors and actions will quickly exceed this limit. For long commands, always paste and trigger them inside a command block.
In Java Edition, a tellraw message can be a simple quoted string, a single JSON object, or a list (array) of components enclosed in square brackets. An object lets you define the text alongside its formatting fields.
You can customize your message using the following text component fields:
gold, red, or aqua).true or false.To send a simple gold message to everyone, use a single object:
/tellraw @a {"text":"Hi","color":"gold"}To combine multiple colors and styles in a single line, wrap multiple objects inside a JSON list:
/tellraw @a [{"text":"Warning: ","color":"red","bold":true},{"text":"The arena gates are opening!","color":"yellow","italic":true}]One of the strongest features of JSON chat in Java Edition is interactivity. You can attach a hover tooltip and an optional click action to any text component. The four available click actions are:
open_url: Opens a web link in the player's browser.run_command: Forces the player to run a command or send a chat message when clicked.suggest_command: Places a command or text into the player's chat input box for them to edit or confirm.copy_to_clipboard: Copies a specified string directly to the user's clipboard.Syntax Changes in Java 1.21.5 vs. Older Versions
Pay close attention to your game version when adding interactive events. Java 1.21.5 renamed clickEvent to click_event and hoverEvent to hover_event. Furthermore, click actions in Java 1.21.5 use specific fields like url or command, whereas older versions use clickEvent and hoverEvent with a universal value field.
Here is how to run a command and show hover text in older Java versions:
/tellraw @a {"text":"[Click to Spawn]","color":"green","clickEvent":{"action":"run_command","value":"/trigger spawn"},"hoverEvent":{"action":"show_text","value":"Teleport to the hub"}}Here is the updated syntax for Java 1.21.5 using the renamed fields and specific action keys:
/tellraw @a {"text":"[Visit Website]","color":"aqua","underlined":true,"click_event":{"action":"open_url","url":"https://text.9minecraft.net"}}/tellraw @a {"text":"[Claim Kit]","color":"gold","click_event":{"action":"run_command","command":"/trigger starter_kit"}}Beyond plain text, JSON messages support dynamic components that pull live information from the game world or the player's client settings:
You can mix these dynamic components into a component list alongside normal text. For example, to greet the closest player by their actual username and show their current control binding for jumping:
/tellraw @p [{"text":"Hello ","color":"yellow"},{"selector":"@p","color":"aqua"},{"text":"! Press ","color":"yellow"},{"keybind":"key.jump","color":"green","bold":true},{"text":" to start.","color":"yellow"}]Minecraft Bedrock Edition also includes the /tellraw command, but its JSON structure is much simpler and does not use Java's color fields or click events. Instead, Bedrock wraps components inside a rawtext array and applies colors and styles directly inside the text string using section signs (§).
The basic Bedrock format looks like this:
/tellraw @a {"rawtext":[{"text":"§6Welcome to the server!"}]}You can chain multiple formatting codes together inside the quotes to combine colors and styles:
/tellraw @p {"rawtext":[{"text":"§c§lAlert: §r§eYou entered a restricted zone."}]}Writing raw JSON by hand often leads to missing brackets or misplaced quotation marks. Using the generator tool on text.9minecraft.net speeds up the process and prevents syntax errors:
& codes to quickly mark colors and styles.@a, @p, @s, or @r).open_url, run_command, suggest_command, or copy_to_clipboard) and enter your hover text if you are playing on Java Edition./tellraw command. If it is under 256 characters, paste it directly into your chat bar. If it is longer, give yourself a command block (/give @s command_block), paste the command inside, and power it with a button or redstone block.Minecraft limits the chat input box to 256 characters. Because JSON formatting adds many brackets, quotes, and field names, you should paste long tellraw commands into a command block instead of the chat bar.
Java 1.21.5 renamed clickEvent to click_event and hoverEvent to hover_event. Additionally, click actions in 1.21.5 use specific fields like url or command instead of the generic value field used in older versions.
Bedrock Edition does not use the JSON color field. Instead, use the {"rawtext":[{"text":"..."}]} structure and place § formatting codes directly inside the text string.
Vanilla /tellraw does not parse & codes on its own. However, you can draft a message with & codes inside a generator tool to quickly convert them into valid JSON color and style fields for Java, or § codes for Bedrock.