Skip to content

Format

The MiniMessage language uses tags. Everything you do will be defined with tags. Tags have a start tag and an end tag (the <reset> tag is an exception here). Start tags are mandatory (obviously), but end tags aren’t outside of strict mode. The following are all visually identical:

<yellow>Hello <blue>World<yellow>!
<yellow>Hello <blue>World</blue>!
<yellow>Hello </yellow><blue>World</blue><yellow>!</yellow>

For tags with no content, tags can be auto-closed by using the format <tag/>. With this format, even in strict mode no separate closing tag should be provided.

All tag names are case-insensitive to reduce the possibility for conflict, but we recommend keeping all tag names lowercase (or at the very least, being consistent).

Some tags have argument. Those look like this: <tag:argument>stuff</tag>. For example:

<hover:show_text:"<red>test:TEST">TEST
<click:run_command:test>TEST

As you can see, those sometimes contain components, sometimes just numbers, strings, or other types. Refer to the detailed docs below.

Single (') and double (") quotes can be used interchangeably. We recommend staying consistent, though in order to minimize escaping it might make more sense to switch quote types for some arguments.

Any meaningful token can be escaped in the locations where they have influence. In plain text, tag open characters (<) can be escaped with a leading backslash (\). Within quoted strings, the opening quote character can be escaped (' or "). In either place, the escape character can be escaped in places where it would otherwise be relevant. Unquoted tag arguments cannot have escapes, for simplicity. In locations where escaping is not supported, the literal escape character will be passed through. In locations where escaping is supported but a literal escape character is desired, the escape character can itself be escaped to produce a \.

The default tags try to represent components in a manner compatible with Vanilla, but simplifying some elements. It might be helpful to use the minecraft wiki as a reference for the Vanilla component system, especially for things like the actions and values of click and hover events.

The MiniMessage Web Viewer allows testing MiniMessage text locally, without having to spin up a Minecraft instance. It can be helpful to put examples from these docs into the viewer while learning.

By default, MiniMessage is extremely lenient, and any invalid tags will just be ignored. Any tags left unclosed at the end of an input string will be automatically closed.

Applications can optionally enable strict mode, which prohibits using <reset>, and requires all tags to be closed in reverse order of opening. Any application using MiniMessage should make it clear to end users which language variant is being used.

These are the tags included and enabled by default in MiniMessage. Specific parses of MiniMessage may add custom tags to this list, or restrict the available tags to a subset of this list. Consult application documentation for details.

Color the next parts

Tag

  • <_colorname_>

Arguments

  • _colorname_, any minecraft color constant: black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple, gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow, or white.

    dark_grey can be used in place of dark_gray, and so can grey in place of gray. Hex colors are supported as well, with the format #RRGGBB.

Examples

<yellow>Hello <blue>World</blue>!
<red>This is a <green>test!
<#00ff00>R G B!

Preview

The result of parsing `<yellow>Hello <blue>World</blue>!`, shown in-game in the Minecraft client's chat windowThe result of parsing `<red>This is a <green>test!`, shown in-game in the Minecraft client's chat window

A more verbose way of defining colors

Tag

  • <color:_colorNameOrHex_>

Aliases

  • colour, c

Arguments

  • _colorNameOrHex_, can be any of the values from above (so named colors or hex colors)

Examples

<color:yellow>Hello <color:blue>World</color:blue>!
<color:#FF5555>This is a <color:#55FF55>test!

Preview

The result of parsing `<color:yellow>Hello <color:blue>World</color:blue>!`, shown in-game in the Minecraft client's chat windowThe result of parsing `<color:#FF5555>This is a <color:#55FF55>test!`, shown in-game in the Minecraft client's chat window

Color the shadow of the next parts

Tag

  • <shadow:_colorNameOrHex_:[alpha_as_float]>
  • <!shadow> as an alias to disable the shadow (equivalent to <shadow:#00000000>)

Arguments

  • _colorNameOrHex_, a named color or hex color string with the format #RRGGBB or #RRGGBBAA
  • [alpha_as_float], a float value between 0 and 1, representing the alpha value of the shadow. Optional, defaults to 0.25. Has no effect if an alpha value is already provided in the hex color string.

Examples

<shadow:yellow>Hello <shadow:aqua:0.5>World</shadow>!
<shadow:#FF5555>This is a <shadow:#55FF55>test!
<shadow:#000000FF><b>Thicc

Preview

The result of parsing `<shadow:yellow>Hello <shadow:aqua:0.5>World</shadow>!` shown in-game in the Minecraft client's chat windowThe result of parsing `<shadow:#FF5555>This is a <shadow:#55FF55>test!` shown in-game in the Minecraft client's chat windowThe result of parsing `<shadow:#000000FF><b>Thicc` shown in-game in the Minecraft client's chat window

Decorate the next parts

Tag

  • <_decorationname_[:false]>, or <!_decorationname_> as an alias to invert the decoration.

Arguments

  • _decorationname_, Any decoration supported in Minecraft:
DecorationAliases
boldb
italicem or i
underlinedu
strikethroughst
obfuscatedobf

Examples

<underlined>This is <bold>important</bold>!

Preview

The result of parsing `<underlined>This is <bold>important</bold>!`, shown in-game in the Minecraft client's chat window

Close all currently open tags, resetting color/decoration/etc. The reset tag cannot be closed.

In strict mode, reset tags are forbidden.

Tag

  • <reset>

Arguments

  • none

Examples

<yellow><bold>Hello <reset>world!

Preview

The result of parsing `<yellow><bold>Hello <reset>world!`, shown in-game in the Minecraft client's chat window

Allows doing multiple things when clicking on the component.

Tag

  • <click:_action_:_value_>

Arguments

Examples

<click:run_command:/seed>Click</click> to show the world seed!
Click <click:copy_to_clipboard:Haha you suck> this </click>to copy your score!

Preview

The result of parsing `<click:run_command:/seed>Click</click> to show the world seed!`, shown in-game in the Minecraft client's chat window

Allows doing multiple things when hovering on the component.

Tag

  • <hover:_action_:_value..._>

Arguments

  • _action_, the type of hover event, one of this list
  • _value..._, arguments specific to each event action:
ActionValue
show_text_text_ (a MiniMessage string)
show_item_type_[:_count_[:tag]] (a Key for the item’s type, optionally followed by count (an integer) and tag (a SNBT string))
show_entity_type_:_uuid_[:_name_] (a Key ID of the entity type, the entity’s UUID, and an optional custom name)

Examples

<hover:show_text:'<red>test'>TEST

Preview

The result of parsing `<hover:show_text:'<red>test'>TEST`, shown in-game in the Minecraft client's chat window

Allows displaying the configured key for actions

Tag

  • <key:_key_>

Arguments

  • _key_, the keybind identifier of the action

Examples

Press <red><key:key.jump> to jump!

Preview

The result of parsing `Press <red><key:key.jump> to jump!`, shown in-game in the Minecraft client's chat window

Allows displaying minecraft messages using the player locale

Tag

  • <lang:_key_:_value1_:_value2_...>

Aliases

  • tr, translate

Arguments

  • _key_, the translation key
  • _valueX_, optional values that are used for placeholders in the key (they will end up in the with tag in the JSON)

Examples

You should get a <lang:block.minecraft.diamond_block>!
<lang:commands.drop.success.single:'<red>1':'<blue>Stone'>!

Preview

The result of parsing `You should get a <lang:block.minecraft.diamond_block>!`, shown in-game in the Minecraft client's chat window in EnglishThe result of parsing `<lang:commands.drop.success.single:'<red>1':'<blue>Stone'>!`, shown in-game in the Minecraft client's chat window in English

Allow insertion of text into chat via shift click

Tag

  • <insertion:_text_>

Arguments

  • _text_, the text to insert

Examples

Shift-click <insert:test>this</insert> to insert!

Preview

The result of parsing `Shift-click <insert:test>this</insert> to insert!`, shown in-game in the Minecraft client's chat window

Rainbow-colored text?!

Tag

  • <rainbow:[!][phase]>

Arguments

  • phase, optional
  • !, literal value which reverses the rainbow, optional

Examples

<yellow>Woo: <rainbow>||||||||||||||||||||||||</rainbow>!
<yellow>Woo: <rainbow:!>||||||||||||||||||||||||</rainbow>!
<yellow>Woo: <rainbow:2>||||||||||||||||||||||||</rainbow>!
<yellow>Woo: <rainbow:!2>||||||||||||||||||||||||</rainbow>!

Preview

The result of parsing all four examples in series, shown in-game in the Minecraft client's chat window

Gradient colored text

Tag

  • <gradient:[color1]:[color...]:[phase]>

Arguments

  • a list of 1 to n colors, either hex or named colors and an optional phase parameter (range -1 to 1) allows you to shift the gradient around, creating animations.

Examples

<yellow>Woo: <gradient>||||||||||||||||||||||||</gradient>!
<yellow>Woo: <gradient:#5e4fa2:#f79459>||||||||||||||||||||||||</gradient>!
<yellow>Woo: <gradient:#5e4fa2:#f79459:red>||||||||||||||||||||||||</gradient>!
<yellow>Woo: <gradient:green:blue>||||||||||||||||||||||||</gradient>!

Preview

The result of parsing the examples for the gradient tag, shown in-game in the Minecraft client's chat window

Transitions between colors. Similar to a gradient, but everything is the same color and the phase chooses that color

Tag

  • <transition:[color1]:[color...]:[phase]> Arguments
  • a list of 1 to n colors, either hex or named colors and an optional phase parameter (range -1 to 1) allows you to shift the transition around, creating animations. Examples
<transition:#00ff00:#ff0000:0>|||||||||</transition>
<transition:white:black:red:[phase]>Hello world [phase]</transition>

Preview

The result of parsing `<transition:white:black:red:[phase]>Hello World [phase]</transition>`, shown in-game in the Minecraft client's chat window

Allows to change the font of the text

Tag

  • <font:key>

Arguments

  • the namespaced key of the font, defaulting to minecraft

Examples

Nothing <font:uniform>Uniform <font:alt>Alt </font> Uniform
<font:myfont:custom_font>Uses a custom font from a resource pack</font>

Preview

The result of parsing `Nothing <font:uniform>Uniform <font:alt>Alt  </font> Uniform`, shown in-game in the Minecraft client's chat window

Insert a newline character.

Tag

  • <newline>

Aliases

  • br

Arguments

  • none

Examples

Let me insert a <newline>line break here.
<hover:show_text:'<red>Hover with a<newline><green>line break'>Text with<newline>line break</hover>

Preview

The result of parsing `<hover:show_text:'<red>Hover with a<newline><green>line break'>Text with<newline>line break</hover>`, shown in-game in the Minecraft client's chat window

(since v4.11.0) Insert a selector component

Tag

  • <selector:_sel_[:_separator_]>

Aliases

  • sel

Arguments

  • _sel_, the selector pattern to insert
  • _separator_ (optional), the separator to insert between values the selector matches

Examples

Hello <selector:@e[limit=5]>, I'm <selector:@s>!

Preview

The result of parsing `Hello <selector:@e[limit=5]>, I'm <selector:@s>!`, show in-game in the Minecraft client's chat window

(since v4.13.0) Insert a score component.

Tag

  • <score:_name_:_objective_>

Arguments:

  • _name_, the name of the score holder on the server scoreboard, or a selector resolved with receiver context
  • _objective_, the name of the objective to get name’s score in

Examples

You have won <score:rymiel:gamesWon/> games!

(since v4.13.0) Insert a NBT component. The syntax of this tag is intended to be familiar to users of vanilla Minecraft’s /data command.

Tag

  • <nbt:block|entity|storage:id:path[:_separator_][:interpret]>

Aliases

  • data

Arguments:

  • block|entity|storage the type of data source to read from — a block entity, an entity selector, or the persistent command storage container
  • _id_, the position for a block NBT component, a selector for an entity NBT component, or a key (resource location) for a storage NBT component
  • _path_, the NBT path to resolve from within the data source
  • _separator_, the separator between multiple values, if (primarily for entity NBT) the data source returns more than one
  • interpret, the literal text interpret if the result should be parsed as component JSON

Examples

Your health is <nbt:entity:'@s':Health/>

(since v4.18.0) Colors the text inside the tags with a gradient corresponding to a pride flag.

Tag

  • <pride[:flag]>

Arguments

  • flag the flag to use, may be one of pride, progress, trans, bi, pan, nb, lesbian, ace, agender, demisexual, genderqueer, genderfluid, intersex, aro, baker, philly, queer, gay, bigender or demigender.

Examples

Happy <pride>pride month</pride>!
Kyori supports <pride:trans>trans rights</pride>!