Text formatting in Minecraft is the primary way players, map makers, and server administrators inject personality and clarity into the game world. Whether you are looking to change the color of your chat messages, create interactive signs, or design complex server announcements, understanding the underlying systems—Legacy Formatting Codes and Raw JSON—is essential.

Minecraft utilizes two main systems for text manipulation. The Legacy system relies on the section sign (§), while the modern system uses Raw JSON (JavaScript Object Notation). While the Legacy system is simpler for everyday use in chat and on signs, the JSON format provides the power required for advanced map making and technical server management.

The Legacy Formatting System Using Section Signs

The Legacy system is the oldest and most widespread method of formatting text in Minecraft. It works by placing a section sign (§) followed by a specific character. This combination tells the game engine to modify the appearance of the text that follows it.

In many server environments and plugins, the ampersand (&) is often used as a convenient shortcut for the section sign. However, within the base game’s internal files and certain commands, the true section sign (§) is required.

Minecraft Color Codes Reference

Colors are represented by a single digit (0-9) or a letter (a-f). Here is the definitive list of legacy color codes compatible across both Java and Bedrock editions:

Code Color Name Hex Equivalent Description
§0 Black #000000 The darkest possible text color.
§1 Dark Blue #0000AA A deep blue often used for official notices.
§2 Dark Green #00AA00 A classic green, synonymous with nature.
§3 Dark Aqua #00AAAA A dark cyan hue.
§4 Dark Red #AA0000 Commonly used for warnings or danger.
§5 Dark Purple #AA00AA A royal purple shade.
§6 Gold #FFAA00 A vibrant orange-yellow.
§7 Gray #AAAAAA The standard color for many UI elements.
§8 Dark Gray #555555 A muted gray, perfect for secondary text.
§9 Blue #5555FF A lighter, more vibrant blue.
§a Green #55FF55 A bright, neon-like green.
§b Aqua #55FFFF A bright cyan or sky blue.
§c Red #FF5555 The standard bright red for errors.
§d Light Purple #FF55FF A pinkish-purple or magenta.
§e Yellow #FFFF55 Bright yellow, highly visible against dark backgrounds.
§f White #FFFFFF The default text color for chat and signs.

Style and Formatting Codes

Beyond simple colors, Minecraft offers several style modifiers to change the weight and behavior of text.

  • §l (Bold): Increases the thickness of the font.
  • §o (Italic): Slants the text to the right.
  • §n (Underline): Adds a horizontal line beneath the text (Java Edition only).
  • §m (Strikethrough): Adds a horizontal line through the center of the text (Java Edition only).
  • §k (Obfuscated): Creates "magic" text where characters constantly shift and change randomly.
  • §r (Reset): Clears all previous colors and styles, returning the text to the default white, unstyled state.

The Crucial Rule of Formatting Order

One of the most common mistakes when using legacy codes is applying them in the wrong order. In Minecraft's rendering engine, a color code always resets any style codes that come before it.

If you want to create text that is both Red and Bold, you must place the color code before the style code.

  • Correct: §c§lThis text is Red and Bold
  • Incorrect: §l§cThis text is only Red

In the incorrect example, the §c code resets the formatting, effectively deleting the §l instruction. Always remember: Color first, Style second.

How to Type the Section Sign (§) on Different Devices

Since the section sign is not a standard key on most keyboards, players must use specific shortcuts to input it depending on their platform.

Windows

Hold the Alt key and type 0167 or 21 on the numeric keypad. Release the Alt key, and the symbol should appear. If you are using a laptop without a numpad, you may need to copy and paste the symbol from an external source.

macOS

Press Option + 6. This is generally the most straightforward way to access the symbol on Apple computers.

iOS and Android

On the virtual keyboard, tap and hold the ampersand (&) or the paragraph symbol (). A pop-up menu will usually appear containing the § symbol.

Game Consoles (Xbox, PlayStation, Nintendo Switch)

While typing in chat or on a sign, look for a special characters menu (usually accessible via the Shift or Symbols button on the on-screen keyboard). The § symbol is typically located near the paragraph or currency symbols.

Bedrock Edition Exclusive Formatting Codes

Minecraft Bedrock Edition (which includes consoles, mobile, and the Windows Store version) features several unique color codes not found in the standard Java Edition. These are often used for specific UI elements or branded content.

  • §g (Minecoin Gold): A specific shade of gold used to match the Minecoin currency.
  • §h (Warm Light Gray): A softer, warmer gray tone.
  • §i (Cool Light Gray): A bluish-gray tone.
  • §j (Dark Brown): A deep earthy tone.
  • §s (Aqua): A specific aqua variant.
  • §t (Dark Teal): A deep blue-green.
  • §u (Purple): A unique purple variant.

Bedrock also handles formatting persistence differently. On Bedrock, a color code does not always reset the style codes, though it is still best practice to follow the "Color First" rule to ensure cross-platform compatibility if you are designing for a server.

Modern Text Formatting with Raw JSON

As Minecraft evolved, the limitations of the Legacy system became apparent. The Legacy system cannot handle interactivity, such as clicking a message to run a command. To solve this, Mojang introduced the Raw JSON Text Format.

This format is primarily used in commands like /tellraw, /title, and /give (when creating items with custom names or lore).

Basic JSON Structure

A JSON text component is wrapped in curly braces {}. At its simplest, it defines a string of text:

{"text":"Hello World"}

To add formatting, you add additional "keys" to the object:

{"text":"Hello World", "color":"red", "bold":true}

Using the /tellraw Command

The /tellraw command is the standard way to send formatted JSON messages to players. The syntax is:

/tellraw <targets> <message>

Example: Sending a message to all players /tellraw @a {"text":"Warning: Server restarting!", "color":"dark_red", "bold":true, "italic":true}

Complex Nested Components

JSON allows for "extra" components, which lets you combine different formats in a single command line without the clutter of legacy codes.

/tellraw @a {"text":"Welcome, ", "color":"gray", "extra":[{"text":"PlayerName", "color":"gold", "bold":true}, {"text":" to the server!", "color":"gray"}]}

In this example, "Welcome, " and " to the server!" are gray, while the "PlayerName" is gold and bold.

Interactive JSON Elements: Click and Hover Events

The true power of Raw JSON lies in its ability to make text interactive. This is vital for map makers creating quest logs or server admins creating help menus.

Click Events

A clickEvent allows a player to trigger an action by clicking the text in their chat window.

  • open_url: Opens a website in the player's browser.
  • run_command: Forces the player to execute a command.
  • suggest_command: Places a command in the player's chat bar without executing it.
  • change_page: Used in books to turn pages.

Example: A clickable help message /tellraw @s {"text":"Click here for help!", "color":"aqua", "clickEvent":{"action":"run_command", "value":"/help"}}

Hover Events

A hoverEvent displays additional information when a player mouses over the text.

  • show_text: Displays a formatted text component.
  • show_item: Displays the tooltip of a specific item.
  • show_entity: Displays an entity's name and type.

Example: Hovering to see details /tellraw @s {"text":"[Special Item]", "color":"green", "hoverEvent":{"action":"show_text", "contents":{"text":"This is a legendary sword!", "color":"gold"}}}

Hex Colors: The RGB Revolution (Java Edition 1.16+)

Since Java Edition 1.16, players are no longer limited to the 16 legacy colors. Minecraft now supports full 24-bit Hex/RGB colors, offering over 16 million possibilities.

Hex Codes in JSON

In a JSON component, you can simply replace the standard color name with a Hex code.

{"text":"Custom Mint Color", "color":"#98FF98"}

Hex Codes in Legacy Format (§x)

While standard chat doesn't support direct Hex input, the game engine processes Hex colors using a specific legacy sequence: §x followed by each character of the hex code preceded by a §.

For the color #FF5555, the legacy sequence would be: §x§F§F§5§5§5§5

This is incredibly useful for server owners customizing their Message of the Day (MOTD) or for modders working with older configuration files that don't yet support JSON.

Practical Applications for Text Formatting

Understanding the theory is one thing, but applying it in-game is where the value truly lies.

Enhancing Signs and Books

Signs are one of the most common places players use formatting. In Bedrock Edition, you can simply type the § codes directly onto the sign. In Java Edition, modern versions require you to use a JSON-based command or a mod, as direct § input was disabled for security and consistency reasons.

Bedrock Sign Example: Line 1: §lWELCOME Line 2: §1TO MY BASE

Customizing Item Names and Lore

Using the /give command, you can create items that stand out in an inventory.

/give @p diamond_sword{display:{Name:'{"text":"Excalibur","color":"gold","italic":false}',Lore:['{"text":"Forged in the heart of a star","color":"dark_purple","italic":true}']}} 1

Note: In Java 1.20.5 and later, the component syntax changed slightly (using custom_name and lore instead of the display tag), but the underlying JSON logic remains identical.

Server MOTD Customization

The Message of the Day is the text displayed under a server's name in the multiplayer menu. To format this, you must edit the server.properties file. Because this file uses standard text, you often use the Unicode escape sequence for the section sign: \u00A7.

Example MOTD Configuration: motd=\u00A7aSurvival \u00A7r| \u00A76Season 2 \u00A7lNOW LIVE

This would render as a green "Survival," followed by a standard pipe, and then "Season 2 NOW LIVE" in bold gold.

Common Troubleshooting and Limitations

Even with the right codes, text formatting can sometimes behave unexpectedly.

Why do my colors disappear?

If you apply a style code (like bold) and then a color code, the style is lost. As discussed in the "Formatting Order" section, always place the color code first.

Performance and Obfuscated Text

Using the §k (obfuscated) code on a massive scale—such as a wall of hundreds of signs—can cause frame rate drops for players with lower-end hardware. The game has to constantly recalculate the random characters for every frame. Use this effect sparingly for atmospheric highlights rather than bulk text.

The "§r" Reset Code

If you are creating a long string of text with multiple colors, always end each segment with §r if the next segment is supposed to be default. This prevents "bleeding" where a color or style accidentally applies to text it shouldn't.

Java vs. Bedrock Command Differences

Remember that Bedrock uses the rawtext tag in its JSON implementation for commands like /tellraw.

Bedrock Syntax: /tellraw @a {"rawtext":[{"text":"Hello"}]}

Java Syntax: /tellraw @a {"text":"Hello"}

Failing to include the rawtext wrapper on Bedrock will result in a syntax error.

Summary of Minecraft Text Formatting

Minecraft text formatting bridges the gap between simple aesthetic choices and complex technical execution. By mastering the Legacy color codes, you gain immediate control over chat and signs. By delving into Raw JSON, you unlock the ability to create interactive experiences, custom items, and professional server displays.

Key takeaways:

  • Legacy Codes: Use § plus a character. Always put color before style.
  • JSON: Use for commands and interactivity. Supports clickEvent and hoverEvent.
  • Hex Colors: Supported in Java 1.16+ for millions of color options.
  • Platform Differences: Be mindful of Bedrock's rawtext requirement and unique colors like §g.

FAQ

What is the code for the Minecraft "Magic" text? The code is §k. It is officially called "Obfuscated" text and causes characters to cycle randomly.

How do I make text bold and blue? Use §1§l followed by your text. The §1 provides the dark blue color, and §l adds the bold weight.

Can I use Hex colors on Minecraft signs? In Bedrock Edition, no; you are limited to the legacy colors. In Java Edition, you can use Hex colors on signs only if you place them using commands or external editors that support JSON sign data.

Why can't I type the § symbol in Minecraft chat? In many versions of Java Edition, the § symbol is blocked from direct chat input to prevent players from spoofing system messages. Most servers allow you to use the & symbol as a replacement if they have specific plugins installed (like EssentialsX).

What is the most common use for §r? The §r (reset) code is most commonly used at the end of a colored segment to ensure that the rest of the sentence returns to the default white font, preventing styles from spilling over.

Does Minecraft Bedrock support strikethrough? No, strikethrough (§m) and underline (§n) are currently exclusive to the Java Edition of the game.

What is the JSON key for making text clickable? The key is clickEvent. Inside this object, you must specify an action (like run_command) and a value (the command itself).

How do I get the Minecoin Gold color? The Minecoin Gold color is exclusive to Bedrock Edition and can be accessed using the code §g.