nurshia

Tellraw Generator

Build /tellraw, /title and raw JSON text components with colors, click events and hover text. Outputs SNBT for 1.21.5+ and JSON for older versions.

Message

1
Click, hover & insertion
2
Click, hover & insertion
3
Click, hover & insertion
Import from & codes

Preview

Hover the preview to see hover text.

Command

SNBT354 chars
/tellraw @a {text:"",extra:[{text:"[Shop] ",color:"gold",bold:true},{text:"Spring sale is on! ",color:"gray"},{text:"Open the shop",color:"green",underlined:true,click_event:{action:"run_command",command:"/warp shop"},hover_event:{action:"show_text",value:{text:"",extra:[{text:"Click to teleport\n",color:"green"},{text:"to the shop",color:"gray"}]}}}]}
Longer than 256 characters, so it can’t be typed in chat. Use a command block, a function or a datapack instead.

1.21.5 changed text components in commands to SNBT, renamed clickEvent/hoverEvent to click_event/hover_event and gave each action its own field (url, command, page). Pick “1.16 – 1.21.4” for older servers.

Guide

How to use

  1. 1Build the message from parts. Each part has its own color, formatting and optional click and hover behaviour.
  2. 2Use Selector, Keybind or Score parts for player names, the player’s own key bindings or scoreboard values.
  3. 3Choose the command and your Minecraft version, then copy the result into chat, a command block or a function.

Good to know

1.21.5 changed the syntax

Commands now take components as SNBT: {text:"Hi",click_event:{action:"run_command",command:"/spawn"}}. Older versions use JSON with clickEvent and a generic value. The generator writes either.

Why the empty first part?

In a list, later parts inherit the first part’s style. The output starts with an empty, unstyled part so every part keeps exactly the style you gave it.

Questions

How do I make clickable text in Minecraft chat?

Give a part a click action. Run command executes a command as the player who clicks, Suggest command puts text into their chat box, Open URL asks to open a link and Copy to clipboard copies text.

Why doesn’t my tellraw command work after updating to 1.21.5?

Most likely it still uses the old JSON names. Switch the generator to 1.21.5+ to get SNBT with click_event, hover_event and the new url/command fields.

Can players use run_command to run commands they don’t have permission for?

No. The command runs as the clicking player with their permissions, exactly as if they typed it.