Shaphan (Hebrew: שפן, which means "rock badger") is the name of a scribe or court secretary mentioned several times in the Old Testament (2 Kings 22:3-14 and 25:22; and parallels in 2 Chronicles 34:8-20; see also Jeremiah 26:24; 36:10-12; 39:14; 40:5 and following; and 43:6).
When the chief Temple priest Hilkiah discovers an ancient Torah scroll, he gives it to the scribe Shaphan, who in turn brings in to King Josiah. Josiah reads it aloud to a crowd in Jerusalem, resulting in a great religious revival. Many scholars believe this was either a copy of the Book of Deuteronomy or a text that became a part of Deuteronomy as we have it; as a result the event is known as the Deuteronomic reform.
According to the Bible, Shaphan had sons named Ahikam, Elasah and Gemariah. The latter appears not to be the same Gemariah named as a son of Hilkiah in Jeremiah 29:3. Assuming it is the same Shaphan, he also had a son named Jaazaniah, who is among the idol worshippers depicted in the vision of Ezekiel described in Ezekiel 8:11.
Shaphan's grandson is Gedaliah, the short-lived governor of Judah appointed by Nebuchadnezzar after the destruction of Jerusalem in 586 BCE. Whether influenced by Shaphan's part in Josiah's reforms or not, both Ahikam and, later, Gedaliah appear to have played significant roles in protecting Jeremiah from persecution.
During the excavations at the City of David headed by Israeli archeologist Yigal Shiloh, a number of bullae were discovered in stratum X, destroyed by the Babylonians in ca. 586 BCE. Bulla 2 reads: belonging to Gemaryahu ben Shaphan. Shiloh posited that the Gemaryahu of this bulla is to be identified with "Gemaryahu son of Shaphan the scribe" who is mentioned in a biblical text, a figure during the reign of Jehoiakim (r. 609-598 BCE). If this is the case, it could confirm Gemaryahu alongside Ahikam as a son of Shaphan. However, archaeologist Yair Shoham notes: "It should be borne in mind, however, that the names found on the bullae were popular in ancient times and it is equally possible that there is no connection between the names found on the bullae and the person mentioned in the Bible."