The school story is a fiction genre centring on older pre-adolescent and adolescent school life, at its most popular in the first half of the twentieth century. While examples do exist in other countries, it is most commonly set in English boarding schools and mostly written in girls' and boys' subgenres, reflecting the single-sex education typical until the 1950s. It focuses largely on friendship, honour and loyalty between pupils. Plots involving sports events, bullies, secrets, rivalry and bravery are often used to shape the school story.
The popularity of the traditional school story declined after the Second World War, but school stories have remained popular in other forms, with a focus on state run coeducational schools, and themes involving more modern concerns such as racial issues, family life, sexuality and drugs (see Grange Hill). More recently it has seen a revival with the success of the Harry Potter series, which uses many plot motifs commonly found in the traditional school story.
The Governess, or The Little Female Academy by Sarah Fielding, published in 1749, is generally seen as the first boarding school story.  Fielding's novel was a moralistic tale with tangents offering instruction on behavior, and each of the nine girls in the novel relates her story individually. However, it did establish aspects of the boarding school story which were repeated in later works. The school is self-contained with little connection to local life, the girls are encouraged to live together with a sense of community and collective responsibility.  Fielding's approach was imitated and used as a formula by both her contemporaries and other writers into the 19th century. 
School stories were a somewhat late arrival as a popular literature. Children as a market were generally not targeted until well into the nineteenth century. There was concern about the moral effect of novels on young minds, and those that were published tended to lean towards giving moral instruction. 
Jane Eyre (1847) by Charlotte Brontë, and Dombey and Son (1848) and David Copperfield (1850) by Charles Dickens had school story elements, which generated considerable public interest  and close to 100 school stories had been published between 1749 and 1857, the year that Tom Brown's School Days by Thomas Hughes appeared. It is perhaps the most famous of all such tales, and its popularity helped firmly establish the genre, which rapidly expanded in the decades to follow across thousands of novels. 
Hughes never wrote another school story: the sequel Tom Brown at Oxford focused on university life. However, more school stories followed such as F.W. Farrar's Eric, or, Little by Little: A Tale of Roslyn School (1858), Revd H.C. Adams' Schoolboy Honour; A Tale of Halminster College (1861) and A.R. Hope's Stories of Whitminster (1873). In 1870 the Education Act paved the way for universal education for children, and so gave the market for school stories a considerable boost, which led to some publishers advertising novels specifically as school stories. 
Talbot Baines Reed wrote a number of school stories in the 1880s, and contributed considerably to shaping the genre, taking inspiration from Thomas Hughes. His most famous work was The Fifth Form at St. Dominic's (1887) (serialised 1881–82). It was reprinted on a number of occasions, selling 750,000 copies in a 1907 edition. While seated in Baines Reed's Christian values, The Fifth Form at St Dominic's showed a definite leaning from the school story as instructional moral literature for children and with greater focus on the pupils and a defined plot. 
As schools were segregated by gender in the nineteenth century, school stories naturally formed two separate but related genres of girls' school stories and boys' school stories. 
There had been an increase in female schooling from the 1850s, augmented by the 1870 Education Act. L. T. Meade, who also wrote historical novels and was a magazine editor, become the most popular writer of girls' school stories in the final decade of the nineteenth century. Her stories focused on upper class pupils at boarding schools who learned to earn trust by making mistakes. They had little focus on sports and were primarily interested in friendships and loyalty. They remained largely rooted in Victorian values and preparing girls to be proper wives and mothers. 
Most literature for girls at the turn of the twentieth century focused on the value of self-sacrifice, moral virtues, dignity and aspiring to finding a proper position in societal order. This was to a large extent changed by the publication of Angela Brazil's girls school stories in the early twentieth century, which featured energetic characters who challenged authority, played pranks, and lived in their own youthful world in which adult concerns were sidelined. 
Coeducation remained rare in boarding school stories. Enid Blyton's Naughtiest Girl series was unusually set in a progressive coeducational school. J. K. Rowlings' Harry Potter series represents a more recent example of a mixed-sex boarding school. 
The peak period for school stories was between the 1880s and the end of the Second World War. Comics featuring school stories also became popular in the 1930s. 
After World War II boarding school stories waned in popularity. Coeducational schools for all British schoolchildren were being funded by the public purse; critics, librarians and educational specialists became interested in creating a more modern curriculum and tended to see stories of this type as outdated and irrelevant. School stories have remained popular, however, with a focus shifting towards state-funded day schools with both girls and boys, and dealing with more contemporary issues such as sexuality, racism, drugs and family difficulties. The Bannerdale series of five novels (1949–56) by Geoffrey Trease, starting with No Boats on Bannermere, involved two male and two female pupils of day schools in the Lake District, and a widowed mother. Trease was inspired to set the series in a day school following a letter from a young reader complaining that, despite being the setting for many school stories, boarding schools were in fact no more exciting environments than day schools. This is something remarked upon by the narrator.
The Harry Potter series of novels has in some respects revived the genre, despite having a strong leaning towards fantasy conventions. Elements of the school story prominent in Harry Potter including the action being described almost exclusively from the point of view of pupils.
While school stories originated in Britain with Tom Brown's Schooldays, school stories were also published in other countries. 'Schulromane' were popular in Germany in both the nineteenth and twentieth centuries, and school stories were also published in Soviet Russia. Some American classic children's novels also relate to the genre, including What Katy Did at School (1873) by Susan Coolidge, Little Men (1871) by Louisa May Alcott and Little Town on the Prairie (1941) by Laura Ingalls Wilder. The 1980s and 1990s Sweet Valley High series by Francine Pascal and others are set in California.
However, the core school story theme of the school as a sort of character in itself, actively formed by the pupils and their enjoyment of being there, is primarily a British and American phenomenon. In France, Mémoires d'Un Collégien (1882) by André Laurie (Jean-François Paschal Grousset), set in a boarding-school context similar to Talbot Baines Reed's St. Dominic's in England and Arthur Stanwood Pier's St. Timothy's in America,  would have a considerable influence on French stories in the genre. German school stories tended to be written for adults, in the tradition of the earlier Bildungsroman, and explored the disruption the school environment made to a character's sense of individuality. Soviet stories tended to focus on how individualistic behaviour could be corrected and brought into line with collective goals by the school environment.  Other notable examples of school stories include Japanese manga series such as Sket Dance and School Rumble; and US dramas such as Beverly Hills 90210, Freaks and Geeks, Glee and Pretty Little Liars.
The vast majority of school stories involve the culture of boarding schools in general. Common themes include honour, decency, sportsmanship and loyalty. Competitive team sports often feature and an annual sports event between rival school houses is frequently a part of the plot. Friendships between pupils are a common focus and also relationships with particular teachers, and the difficulty of new pupils fitting into the school culture is a central theme. 
Bullies often feature in school stories, particularly boys' school stories. Identical twins appear with some frequency and are often the subject of comedy.  School principals are usually even handed and wise and provide guidance to characters  and will often bend the rules to get them out of trouble. 
Earlier in the development of the genre, school stories avoided dealing with adolescence or puberty directly.  Eric, or, Little by Little by Dean Farrar was a classic moral tract set in a boarding school. Its Victorian tone was never adopted as generic convention.
Commercially successful authors of school novels include writers for boys, such as P. G. Wodehouse, Anthony Buckeridge, and prolific writer Charles Hamilton, better known as Frank Richards, who wrote the Greyfriars School series, St. Jim's and Rookwood, and others for the Amalgamated Press between 1906 and 1940, his most famous character being Billy Bunter. Writers for girls include Angela Brazil, Enid Blyton, Elinor Brent-Dyer, Dorita Fairlie Bruce, Mary Gervaise and Elsie Oxenham.