Page 1 of 2
Click words to edit them. The right arrow on the last page adds a page.
Note! When you sign the book, it will no longer be editable.
12/32
Segment 1 of 3
Enter starts a new line.
Format
Click & hover
Colour
BlackGive command
Pick who gets the book, then copy it into the game
Give to
2 pages, Java 26.3 item components.
/give @p written_book[written_book_content={title:"Server Guide",author:"Steve",pages:[["",{text:"Welcome to the server!\n\n",bold:true},"This book covers the rules and where to find things.\n\n",{text:"Turn to the rules",color:"dark_blue",underlined:true,click_event:{action:"change_page",page:2},hover_event:{action:"show_text",value:"Jump to page 2"}}],["",{text:"Rules\n\n",color:"dark_red",bold:true},"1. No griefing.\n2. No cheats or x-ray.\n3. Be kind in chat.\n\n",{text:"Full rules online",color:"blue",underlined:true,click_event:{action:"open_url",url:"https://crafty.gg"}}]]}]588 / 256 characters. Too long for chat, paste it into a command block.
How the book command works
The written_book_content component, field by field
Since 1.20.5 a book's contents live in the written_book_content item
component, set in square brackets after the item id. It holds a title (32 characters at most), an author, an optional generation from 0 to 3, and a pages list.
Each page is a text component written in SNBT. A page with several styled segments becomes a list
that starts with an empty string, ["",{text:"Rules",bold:true},...],
so the first segment's style doesn't carry into the rest. Line breaks are \n inside the text.
Click events use the 1.21.5 field names. A table of contents entry is click_event:{action:"change_page",page:2}, and a link is click_event:{action:"open_url",url:"https://..."}.
More Minecraft tools
Other command builders and text tools
Frequently asked questions
Page limits, click events and the /give command
How do I give myself a written book with a command? +
Use /give with the written_book_content item component: /give @p written_book[written_book_content={title:"My Book",author:"Steve",pages:["Page one","Page two"]}]. This generator writes the component for you, including formatting and click events, in the SNBT syntax Java 1.21.5 and later expect.
How much text fits on a book page? +
A page shows 14 lines, each 114 font pixels wide. A book and quill also stops at 1,023 characters per page and 100 pages. The preview uses the same width and line height, and warns you when a page runs past line 14, since the game doesn't draw the rest.
Can books have clickable text? +
Yes. Written books support open_url, run_command, copy_to_clipboard and change_page click events, plus hover text. change_page is book-only and is how a table of contents jumps to a page. suggest_command doesn't work in books, so it isn't offered here.
How long can the title be? +
32 characters. The command fails with a longer title, so the title field stops at 32.
What does generation do? +
It is the line under the title in the tooltip: Original, Copy of original, Copy of a copy or Tattered. A book at Copy of a copy or Tattered can't be copied again in a crafting grid.
The command is too long for chat. What do I do? +
Chat stops at 256 characters, and most books go past that. Paste the command into a command block instead (/give @s command_block), which takes up to 32,500 characters, and power it once.
Command syntax checked for Minecraft 26.3