Thomas Farnaby (or Farnabie) (c. 1575 – 12 June 1647) was an English schoolmaster and scholar.
He was the son of a London carpenter. His grandfather, it is said, had been mayor of Truro, his great-grandfather an Italian musician. He may have been related to Giles Farnaby (1563–1640), the musician and composer, whose father was a joiner.
Between 1590 and 1595 he appears successively as a student of Merton College, Oxford, a pupil in a Jesuit college in Spain, a student at Cambridge, and a follower of Francis Drake and John Hawkins. After some military service in the Low Countries he made shift, says Anthony Wood, to be set on shore in the western part of England; where, after some wandering to and fro under the name of Thomas Bainrafe, the anagram of his surname, he settled at , in Somersetshire, and taught the grammar school there for some time with success.
He opened his own school in Goldsmiths Rents, Cripplegate, London at the beginning of the seventeenth century. This school was a success, in terms of reputation and also financially, and had many pupils, drawing on the sons of nobility. He had boarders as well as day scholars, held his classes in a large garden-house, and joined several houses and gardens together to meet the needs of his establishment. He had a small staff at work with him; in 1630 William Burton (1609–1657), a well-known antiquarian scholar, was one of his assistants. Sir John Bramston the younger, with his brothers, Mountfort and Francis, were among his boarders, and he described the school in his autobiography. Sir Richard Fanshawe, Alexander Gill, and Henry Birkhead were also Farnaby's pupils.
From this school, which had as many as 300 pupils, there issued, says Wood, more churchmen and statesmen than from any school taught by one man in England. In the course of his London career he was made master of arts of Cambridge, and soon after was incorporated at Oxford.