How to Create Custom Written Books with Commands

In Minecraft survival, players write in a book and quill and sign it to create a permanent written book that cannot be edited. Using the generator at text.9minecraft.net, you can bypass manual typing to create colorful, multi-page books and spawn them instantly with commands.

Written Book Generator

Understanding Written Book Limits and Layout

Before writing your content, it helps to know how Minecraft formats and restricts book data. In normal gameplay, signing a book and quill locks the text permanently. When generating books via commands, you must work within the game's display boundaries so your text does not get cut off.

The preview tool on text.9minecraft.net renders the real book GUI texture, complete with accurate word wrap and interactive page flipping. This allows you to check exactly where your lines break before copying the command into your game.

Step-by-Step: Designing Your Book on text.9minecraft.net

The generator simplifies creating complex books by handling the formatting syntax automatically. Follow these steps to build your book:

  1. Set the Title and Author: Enter your desired title (staying within the 32-character limit) and the author name that will appear on the item tooltip.
  2. Write Your Content: Type or paste your text into the editor. Watch the live preview to ensure your text fits neatly within the 14 lines and 114-pixel width per page.
  3. Add New Pages: To split your text across multiple pages, insert a line containing only three dashes: ---. Anything below this line moves to the next page.
  4. Apply Colors and Styles: Use standard ampersand (&) codes to add color and formatting to your text.
  5. Select Your Version and Copy: Choose your Minecraft Java Edition version to generate the exact command format required, then copy the output.

Here is an example of how to structure a three-page book in the editor using page separators and color codes:

&1&lServer Rules
&0Welcome to our Minecraft server! Please read the rules on the following pages.
---
&4Rule 1: &0No griefing.
&4Rule 2: &0Be respectful to all players in chat.
---
&2Enjoy your stay!
&0Ask a moderator if you need help starting out.

Adding Color and Formatting with & Codes

In vanilla survival, typing colored text into a book is tricky, but the generator automatically converts & codes into valid Minecraft text colors and styles. Place the code directly in front of the text you want to change.

When combining colors and styles, always place the color code before the formatting code (for example, &4&lWarning for bold dark red text). Be aware that bold text takes up slightly more pixel width per character, which reduces how many letters fit inside the 114-pixel line limit.

Java Edition Book Commands by Version

Minecraft Java Edition has changed how item data is stored across recent updates. You must use the command syntax that matches your exact game version, otherwise the command will fail with a syntax error.

Java 1.21.5+ (SNBT Text Component)

Starting in Java 1.21.5, the written_book_content component uses clean SNBT text formatting without needing escaped JSON strings:

/give @p written_book[written_book_content={title:"Server Guide",author:"Admin",pages:[{text:"Welcome to the server!",color:"dark_blue",bold:true},{text:"Rule 1: Be kind.",color:"black"}]}] 1

Java 1.20.5 – 1.21.4 (JSON Strings in Component)

In versions 1.20.5 through 1.21.4, books use the written_book_content item component, but the pages inside must be formatted as escaped JSON strings:

/give @p written_book[written_book_content={title:"Server Guide",author:"Admin",pages:['{"text":"Welcome to the server!","color":"dark_blue","bold":true}','{"text":"Rule 1: Be kind.","color":"black"}']}] 1

Java 1.20 – 1.20.4 (Legacy NBT Data)

For versions 1.20 to 1.20.4, item components do not exist. Instead, you use traditional NBT tags with title, author, and pages enclosed in curly braces right after the item ID:

/give @p written_book{title:"Server Guide",author:"Admin",pages:['{"text":"Welcome to the server!","color":"dark_blue","bold":true}','{"text":"Rule 1: Be kind.","color":"black"}']} 1

How to Use Your Generated Command In-Game

Once you have copied the command for your version from text.9minecraft.net, you need to execute it in your world or server. Because custom books often contain multiple pages and colors, the command quickly becomes very long.

Remember that commands require operator permissions on a multiplayer server or cheats enabled in a singleplayer world. If you want to edit a generated written book later, keep a copy of your raw text with the --- separators saved in a text file, since signed written books cannot be edited in-game.

Questions

Can I edit a written book after spawning it or signing it?

No. Just like when a book and quill is signed in survival mode to become a written book, generated written books are permanently locked and cannot be edited in-game. To make changes, edit your text in the generator and run the new command.

How do I create a new page in the book generator?

Type a line consisting of three dashes (---) on its own line. The generator uses --- as a page separator and places all following text onto the next page, up to the maximum limit of 100 pages.

Why does my text wrap differently than in my text editor?

Minecraft book pages display up to 14 lines, and each line is limited by a width of 114 pixels rather than a fixed character count. Wide letters and bold text fill up the 114 pixels faster. Use the live book GUI preview on text.9minecraft.net to check the exact word wrap.

Why is my book command giving a syntax error?

You are likely using a command made for a different version of Minecraft, or your command got cut off by the chat character limit. Make sure you select the right format (1.20-1.20.4 NBT, 1.20.5-1.21.4 JSON strings, or 1.21.5+ SNBT) and paste long commands into a command block.

Related guides

See all →