A Codex is a publication of Games Workshop that details the units and models each army in the Warhammer 40,000 tabletop miniatures game can use in a game. The name is based on the Codex Astartes, the tome written by Roboute Guilliman, the Ultramarines Primarch, detailing how a Space Marine Chapter should be organized. Codices follow the same edition publication history as the Warhammer 40,000 tabletop game itself.

1st Edition

The 1st Edition of the game, published in 1987, is referred to as Rogue Trader. Game designer Rick Priestly created the original rules set (based on the contemporary 2nd Edition of Warhammer Fantasy) alongside the Warhammer 40,000 universe. The game play of Rogue Trader was heavily oriented toward role-playing rather than strict tabletop wargaming. This original version came as a very detailed, though rather jumbled, rulebook, which made it most suitable for fighting small skirmishes. Much of the composition of the units was determined randomly, by rolling dice. A few elements of the setting (bolters, lasguns, frag grenades, Terminator Armour) can be seen in a set of earlier wargaming rules called Laserburn (produced by the now defunct company, Tabletop Games) written by Bryan Ansell. These rules were later expanded by both Ansell and Richard Halliwell (both of whom ended up working for Games Workshop), although the rules were not a precursor to Rogue Trader. Soon the Games Workshop hobby magazine, White Dwarf, started making army lists and devising strategies for people to use in these Rogue Trader games. New models were soon released by Games Workshop for the line and the many people who had always enjoyed Warhammer Fantasy were now thrilled at the idea of Warhammer 40,000 as a tabletop wargame, which was essentially a science fiction, or more properly a science fantasy, setting with many of the same tropes and elements as its dark fantasy counterpart.

2nd Edition

The 2nd Edition of Warhammer 40,000 was released in 1993 as part of Games Workshop's strategy to appeal to a younger fanbase and greatly expanded the number of factions and armies that could now be played. The release of this edition was marked by the production of a boxed starter set containing Ork and Space Marine models with dice and a rules book. The animating idea behind this edition of the game was to provide more opportunities for players to participate in larger battles. Also special characters were introduced to replace the older concept of battlefield heroes (the earlier edition only had three generic "heroic" profiles for each army: champion, minor and major hero). New rules were also provided for the use of psychic powers which were essentially the equivalent of the magical system deployed in Warhammer Fantasy. True codexes as they later became known to fans of the game were still not available early this edition, but the army lists and background information for Warhammer 40,000 printed in White Dwarf became far more deeply detailed. Later in the edition's publication run, Games Workshop introduced the first Codices for each of the playable faction's armies, though they were far smaller and contained a great deal less fictional background information (what fans refer to as "fluff") than the Codices of later editions.

  • Codex: Ultramarines
  • Codex: Angels of Death
  • Codex: Space Wolves
  • Codex: Sisters of Battle
  • Codex: Imperial Guard
  • Codex: Chaos
  • Codex: Eldar
  • Codex: Orks
  • Codex: Tyranids
  • Codex: Assassins

3rd Edition

The 3rd Edition of Warhammer 40,000 was released in 1998 and like the 2nd Edition, concentrated on streamlining the rules for larger battles. The rulebook was available alone, or as a boxed set with miniatures of Space Marines and the newly-introduced Dark Eldar. The 3rd Edition soon introduced Codices for each of the major factions in the game, releasing revised editions of each of these Codices between 2003 and 2004. Towards the end of the 3rd Edition, four new army codices were introduced: the xeno (that is, alien) races of the Necron and the Tau and two armies of the Inquisition: the Ordo Malleus (called Daemonhunters), and the Ordo Hereticus (called Witchhunters); elements of the latter two armies had appeared before in supplementary material (such as Realm of Chaos and 2nd Edition's Codex: Sisters of Battle). At the end of the 3rd Edition, these Inquisition armies were re-released with all-new artwork and army lists. The release of the Tau coincided with a rise in popularity for the game in the United States. The following Codices were released for the 3rd Edition.

  • Codex: Space Marines
  • Codex: Blood Angels
  • Codex: Dark Angels
  • Codex: Dark Angels (Revised)
  • Codex: Chaos Space Marines
  • Codex: Chaos Space Marines (2nd Codex)
  • Codex: Imperial Guard
  • Codex: Imperial Guard (2nd Codex)
  • Codex: Catachans
  • Codex: Assassins
  • Codex: Orks
  • Codex: Tyranids
  • Codex: Eldar
  • Codex: Craftworld Eldar
  • Codex: Tau
  • Codex: Daemonhunters (March 2003)
  • Codex: Dark Eldar (November 2003)
  • Codex: Dark Eldar (Revised)
  • Codex: Necrons (July 2002)
  • Codex: Space Wolves (April 2000)
  • Codex: Witch Hunters (April 2004)
  • Codex: Armageddon
  • Codex: Eye of Terror
  • Codex: Cityfight

4th Edition

The 4th Edition of the game was released in late 2004 and the Revised 3rd Edition Codexes were used until the release of the 4th Edition Codices between 2005 and 2008. This edition did not feature as many major changes as the prior editions, and was "backwards compatible" with each army's 3rd Edition codex. The 4th Edition was released in three forms: the first was a standalone hardcover version, with additional information on painting, scenery building, and background information about the Warhammer 40,000 universe. The second was a boxed set, called Battle for Macragge, which included a compact softcover version of the rules, scenery, dice, templates, and Space Marines and Tyranid miniatures. The third was a limited Collector's Edition. Battle for Macragge was a "game in a box," targeted primarily at beginners. Battle for Macragge was based on the Tyranid invasion of the Ultramarines' homeworld, Macragge, during the First Tyrannic War. An expansion to this was released called The Battle Rages On!, which featured new scenarios and units, like the Tyranid Warrior. The following Codices were released for the 4th Edition.

  • Codex: Space Marines
  • Codex: Tyranids
  • Codex: Blood Angels
  • Codex: Catachans
  • Codex: Black Templars (November 2005)
  • Codex: Chaos Daemons (May 2008)
  • Codex: Chaos Space Marines (September 2007)
  • Codex: Dark Angels (March 2007)
  • Codex: Eldar (November 2006)
  • Codex: Orks (January 2008)
  • Codex: Tau Empire (March 2006)

5th Edition

The 5th Edition of Warhammer 40,000 was released in the summer of 2008. While there are some differences between the 4th and 5th Editions, the general rule set shares numerous similarities. Codex books designed prior to the 5th Edition are still compatible, with only some changes to how those armies function. The replacement for the previous edition's Battle for Macragge starter set is called Assault on Black Reach, which features a pocket-sized rulebook (containing the full ruleset but omitting the background and hobby sections of the full-sized rulebook), and starter Ork and Space Marine armies. Each army contains an HQ choice, either an Ork Warboss or a Space Marine Captain. The following Codices have so far been released for the 5th Edition:

  • Codex: Space Marines (October 2008)
  • Codex: Imperial Guard (May 2009)
  • Codex: Space Wolves (October 2009)
  • Codex: Tyranids (January 2010)
  • Codex: Blood Angels (April 2010)
  • Codex: Dark Eldar (August 2010)
  • Codex: Grey Knights (April 2011)
  • Codex: Necrons (November 2011)

6th Edition

The 6th Edition of Warhammer 40,000 was released in June 2012. The replacement for the previous edition's Assault on Black Reach starter set is called Dark Vengeance. The following Codices have so far been released for the 6th Edition:

  • Codex: Chaos Space Marines (October 2012)
  • Codex: Dark Angels (January 2013)
  • Codex: Chaos Daemons (March 2013)
  • Codex: Tau Empire (April 2013)
  • Codex: Eldar (June 2013)
  • Codex: Space Marines (September 2013)
  • Codex: Adepta Sororitas (October 2013)
  • Codex: Inquisition (November 2013)
  • Codex: Tyranids (January 2014)
  • Codex: Legion of the Damned (February 2014)
  • Codex: Imperial Knights (March 2014)
  • Codex: Astra Militarum [Imperial Guard] (April 2014)
  • Codex: Black Legion (A Codex: Chaos Space Marines Supplement) August 2013
  • Sentinels of Terra (A Codex: Space Marines Supplement) (October 2013)
  • Clan Raukaan (A Codex: Space Marines Supplement) (November 2013)
  • Codex: Crimson Slaughter (A Codes: Chaos Space Marines Supplement) March 2014

7th Edition

7th Edition was released May 2014. The following Codices have so far been released for the 7th Edition:

  • Codex: Orks (June 2014)
  • Codex: Grey Knights (August 2014)
  • Codex: Space Wolves (August 2014)
  • Codex: Dark Eldar (October 2014)
  • Codex: Blood Angels (December 2014)
  • Codex: Necrons (January 2015)
  • Codex: Harlequins (February 2015)
  • Codex: Khorne Daemonkin (March 2015)
  • Codex: Skitarii (April 2015)
  • Codex: Craftworlds (April 2015)
  • Codex: Imperial Knights (May 2015)
  • Codex: Cult Mechanicus (May 2015)
  • Codex: Space Marines (June 2015)
  • Codex: Dark Angels (June 2015)
  • Codex: Tau Empire (October 2015)
  • Waaagh! Ghazghkull (A Codex: Orks Supplement) (June 2014)
  • Champions of Fenris (A Codex: Space Wolves Supplement) (August 2014)
  • Haemonculus Covens (A Codex: Dark Eldar Supplement) (October 2014)