Inside persistentgamedata.dat: how the Isaac save file is structured
persistentgamedata.dat is a small binary file, usually under 10 KB, with a fixed layout that the REPENTOGON team has documented from the game’s code. This page summarises that layout, the checksum that makes hex editing fail, and the numbers that tell editions apart.
Layout
| Part | Contents |
|---|---|
| Header, 16 bytes | The string ISAACNGSAVE09R followed by two spaces. Afterbirth+, Repentance and Repentance+ share it; Afterbirth uses 08R, Rebirth 06R. |
| 4 bytes | A checksum tied to the run in progress, zero when there is none |
| 11 chunks | Each chunk is chunk id, chunk size, element count, then the data, always in the same order |
| Load counter | Observed to grow by 2 every time the save is loaded |
| Checksum, 4 bytes | Computed over everything after the header; the game treats a mismatch as corrupt data |
The eleven chunks in a Repentance+ file
| # | Chunk | Elements | What it holds |
|---|---|---|---|
| 1 | Achievements | 642 | One byte per secret; index 0 is unused, so 641 real achievements |
| 2 | Event counters | 523 | Statistics, donation machines, streaks, and the completion marks as bit fields per character |
| 3 | Level counters | 14 | Per-stage counters |
| 4 | Collectibles | 733 | Item collection flags by item id |
| 5 | Minibosses | 7 | The seven sins |
| 6 | Bosses | 104 | Bosses encountered, by boss id |
| 7 | Challenges | 46 | Challenge completion flags |
| 8 | Cutscenes | 27 | Ending and cutscene counters |
| 9 | Game settings | 2 | Two integers |
| 10 | Special seeds | 80 | Seed effect flags |
| 11 | Bestiary | variable | Four sections written as deaths, kills, hits, encounters; keyed by entity type and variant |
REPENTOGON notes that the size field of most boolean chunks is written as element count times four and does not match the real size, so parsers must trust the element count instead. The bestiary is the only chunk of variable length; old Afterbirth+ files may carry five sections instead of four.
Telling editions apart
The header does not change between Afterbirth+, Repentance and Repentance+. The reliable signal is the element count of the achievements chunk: 349 for Afterbirth+, 404 with Booster Pack 5, 638 for Repentance and 642 for current Repentance+. Reference saves published by Zamiell show that early Repentance+ files, from late 2024 until September 2025, had 641 achievement entries and 521 event counters; the current 642 and 523 appeared around patch 1.9.7.13, which added Item Descriptions. REPENTOGON also mentions a game error, “Attempt to load a save file with the wrong number of achievements!”, that fires when a file from the wrong edition is loaded.
Limits worth knowing
- REPENTOGON caps saves at 65 536 bytes because writing a bigger file to Steam Cloud is reported to crash the unmodified game; typical files are far below that, and heavy mod bestiaries reach around 30 KB.
- The wiki’s Corrupt Data page warns that editing without accounting for the checksum “will likely render the file unusable”, which is exactly what a raw hex edit does.
- The game version is shown on the title screen and in the main menu, and written to log.txt; the latest Repentance+ build as of this page is v1.9.7.17.J460 from 20 April 2026.
Sources
Edit the file in the browser
Drop rep+persistentgamedata.dat into Isaac Save Editor, change what you need, download a valid file. Nothing is uploaded.