Flateyjarbók (Codex Flateyensis, GKS 1005 fol.) — the largest medieval Icelandic manuscript, written 1387–1394 for the chieftain Jón Hákonarson of Víðidalstunga by two priests, Jón Þórðarson and Magnús Þórhallsson, the latter responsible also for the manuscript’s illuminations.
A foreword on f. 1v names patron, scribes and date, an unusual degree of self-documentation for an Icelandic manuscript. The 202 original vellum leaves carry an expansive compilation of konungasögur centred on the sagas of Óláfr Tryggvason and Óláfr helgi, with the kings’ lives swollen by interpolated þættir, genealogies, poems and shorter narratives drawn from a wide field of sources, alongside Sverris saga, Hákonar saga Hákonarsonar, Orkneyinga saga, Færeyinga saga, Grœnlendinga saga, Eiríks saga víðförla and the Flateyjarannáll, which carry events down to the year the manuscript was finished.
A further 23 leaves were inserted in the second half of the 15th century by Þorleifur Björnsson, now folios 188–210, bringing the codex to its present 225 leaves.
The manuscript preserves the only medieval witness to Hyndluljóð and Grœnlendinga saga, among other texts.
It takes its name from Flatey in Breiðafjörður, the home of its 17th-century owner Jón Finnsson, who gave it to Brynjólfur Sveinsson in 1647; Brynjólfur sent it to Frederick III of Denmark in 1656, and it returned to Iceland in 1971.


