The first major biographies of Johann Sebastian Bach, including those by Johann Nikolaus Forkel and Philipp Spitta, were published in the 19th century. Many more were published in the 20th century by, among others, Albert Schweitzer, Charles Sanford Terry, Christoph Wolff and Klaus Eidam.
Little was published about Bach's life in the 18th century, his "Nekrolog" (obituary) being the most extended biographical note about the composer's life.
No writings by Johann Sebastian Bach were published during his lifetime. He declined Johann Mattheson's invitation to write an autobiographical sketch for inclusion in the Ehrenpforte. There is little biographical material to be found in the compositions published during his lifetime: the glimpse perceived from the dedication of The Musical Offering to Frederick the Great being a small exception. There are however some letters by the composer in which he gives autobiographical detail, including the letter he wrote in 1730 to Georg Erdmann, and the letter he had joined to the score of his Mass for the Dresden court in 1733. Other contemporary sources include archived reports, like those of the decisions of the Leipzig city council.
Contemporary publications, like Johann Mattheson's Beschützte Orchestre, Johann Adolph Scheibe's Critischer Musicus and Lorenz Christoph Mizler's Musikalische Bibliothek, rather write about Bach's music than about his life. Bach's entry in Johann Gottfried Walther's 1732 Lexikon is a rare exception in giving biographical information on the composer.