The Red Book of Westmarch (sometimes Red Book of the Periannath, and The Downfall of the Lord of the Rings, also known as the Thain's Book after its principal version) is a fictional manuscript written by hobbits, a conceit of author J. R. R. Tolkien to explain the source of his fantasy writings.
It is a collection of writings in which the events of The Hobbit and The Lord of the Rings were recounted by their characters, and from which Tolkien supposedly derived these and other works.
The name of the book comes from its red leather binding and casing, and also it having been housed in the Westmarch.
In The Hobbit, Tolkien writes of the protagonist and title character Bilbo Baggins composing his memoirs. Bilbo thinks of calling his work There and Back Again, A Hobbit's Holiday. In fact the author's preferred title for The Hobbit was The Hobbit or There and Back Again.
In The Lord of the Rings, this record is said to be written in his red leather-bound diary. Bilbo says to Gandalf that his intended ending would be him living "happily ever after to the end of his days." This is in fact a rephrased line from the final chapter of The Hobbit, originally conveyed through third-person narrative voice.
Bilbo later expands his memoirs into a record of the events of The Lord of the Rings, including the exploits of his kinsman Frodo Baggins and others. He later leaves the material for Frodo to complete and organize. Frodo writes down the bulk of the final work, using Bilbo's diary and "many pages of loose notes". At the close of Tolkien's main narrative the work is almost complete, and Frodo leaves the task to his gardener Samwise Gamgee.
Tolkien provides a "title page" inscribed with various titles that had been subsequently rejected; the final title is Frodo's: