The library is a place to store various forms of knowledge sources, such as books, magazines, newspapers, videos, audio, and others. Libraries are useful for meeting the educational, research, information, and recreational needs of users, such as students, teachers, university students, lecturers, and the general public. The existence of a library is one of the efforts to increase effectiveness and efficiency in the teaching and learning process held in educational institutions, such as junior high schools. Therefore, the library must be managed properly and professionally so that students can easily find a collection of books or magazines. One way to do this is by implementing the Knuth Morris Pratt algorithm in a library information system for searching book data. The fastest time needed by the KMP algorithm in searching book data is 0.012 seconds and the longest time is 0.019 seconds. The average time needed by the KMP algrotima to search book data is 0.014 seconds. Thus, the KMP algorithm is able to work quickly and precisely in searching book data in the SMPN 2 Depok library information system