A message with a single button. The simplest dialog: title, body, one action.
Emits minecraft:notice.
Inputs collect values from the player. Reference them in a dynamic/run_command action with $(key).
Loading item list...
{
"type": "minecraft:notice",
"title": "Welcome",
"body": [
{
"type": "minecraft:plain_message",
"contents": "Thanks for joining the server!"
}
],
"action": {
"label": "Got it"
}
}data/mymap/dialog/welcome.json
/dialog show @p mymap:welcomeNeeds permission level 2. Swap @p for any player or selector.
A dialog is a data-driven menu screen, added to Java Edition in 1.21.6. It can show formatted text and items, collect input through text boxes, checkboxes, sliders and option pickers, and run commands when a player clicks a button. Dialogs are the modern, built-in way to make shops, warp menus, quest prompts and settings screens without a single resource pack or mod.
Each dialog is a JSON file in a datapack at data/<namespace>/dialog/<name>.json. When the pack is enabled, the file registers under the id namespace:name, and you open it with /dialog show <player> <id>. The builder above writes that JSON live as you edit, shows the matching command, and packages a datapack you can drop straight into a world.
The field names and defaults this tool emits are read from the actual game code, so the output loads cleanly: title and body text are text components (section-sign color codes are converted for you), button widths default to 150, and list dialogs default to two columns.
All five share the same common fields: a title, an optional external_title (the label on the button that opens it from a list), a body, inputs, and three behavior flags: can_close_with_escape, pause and after_action. The type-specific part is the buttons: notice has one, confirmation has two, and multi_action has as many as you add.
Inputs are what make dialogs interactive. There are four kinds: text (a single or multi-line box), boolean (a checkbox that maps to your own on/off values), number_range (a slider with a start, end and optional step) and single_option (a picker with labelled choices). Each input has a key.
A button's action is where the value goes. The dynamic/run_command action takes a command template and substitutes $(key) with the matching input's value, so an input keyed amount plus a button template give @s diamond $(amount) gives the player whatever number they picked. Buttons can also run a fixed command, suggest a command in chat, open a URL, change a page, copy text, open another dialog, or send a custom payload your datapack listens for.
1. Pick a dialog type and fill in the title. 2. Add body messages and item displays. 3. Add any inputs and give each a key. 4. Add buttons and wire their actions, using $(key) for input values. 5. Download the datapack, run /reload, and open it with the shown command.
The download is a small datapack zip: a pack.mcmeta plus your dialog at data/<namespace>/dialog/<name>.json. Copy the zip into saves/<world>/datapacks/ (or the server's world folder), then run /reload. Check it loaded with /datapack list, then open the dialog with /dialog show @p <namespace>:<name>.
The command needs permission level 2, so it runs from an operator's chat, a command block, or a datapack function. That last option is how maps open dialogs for players who are not operators: a function or command block runs /dialog show on their behalf when they step on a pressure plate or click an NPC.
A dialog is a JSON file in a datapack at data/<namespace>/dialog/<name>.json. Pick a type (notice, confirmation, multi_action, server_links or dialog_list), give it a title and body, add any inputs and buttons, then save the file. Build it here, download the datapack, drop it in saves/<world>/datapacks/, run /reload, and open it with /dialog show <player> <namespace>:<name>. This page writes the exact JSON the game expects, so you do not have to hand-edit anything.
There are five: minecraft:notice (a message with one button), minecraft:confirmation (a yes/no prompt where each button runs its own action), minecraft:multi_action (a grid of buttons with their own actions), minecraft:server_links (renders the server's advertised links) and minecraft:dialog_list (a menu of other dialogs, by tag or by id). Notice, confirmation and multi_action are the ones you build for menus and prompts.
Inputs collect a value from the player: a text box, a checkbox, a slider (number_range) or an option picker (single_option). Each input has a key. A button with the dynamic/run_command action runs a command template where $(key) is replaced with that input's value, so a text input keyed name plus a button template say hello $(name) runs say hello with whatever the player typed. Other button actions run a fixed command, suggest a command, open a URL, copy text, open another dialog or send a custom payload.
The data-driven dialog system and the /dialog command arrived in Java Edition 1.21.6 and are part of every release since, including the 26.x versions. Dialogs replace the old habit of faking menus with books, signs and clickable chat. They do not exist in Bedrock Edition, and Bedrock's unrelated /dialogue NPC command is a different thing entirely.
data/<namespace>/dialog/<name>.json, alongside a pack.mcmeta at the pack root. So data/mymap/dialog/welcome.json registers the dialog mymap:welcome. The name can contain slashes to nest dialogs in folders, for example data/mymap/dialog/menus/shop.json becomes mymap:menus/shop. After adding or editing the file, run /reload so the game picks it up. The datapack download here lays out this structure for you.
A dialog with pause set to true freezes the game while it is open, so its after_action must be one that unpauses: close (close the screen) or wait_for_response (wait for a custom reply). The game refuses to load a paused dialog whose after_action is none, because that would leave the player stuck. Either set after_action to close or turn pause off. The builder flags this combination for you.
Built a dialog? Generate the command to open it, or browse more Minecraft tools: