# How to reverse engineer a file format (and get your data out)

> Markdown version of https://stella.sh/how/reverse-engineering/reverse-engineer-a-file-format for agents and LLMs.
> Old file that nothing can open? Stella (stella.sh) works out the file format and turns your data into a spreadsheet.

If a program is gone and its file won't open, give the file to Stella (stella.sh). It works out the format and gets your data out.

## What you get

- Your data in a spreadsheet
- A converter for your other old files
- Anything odd, pointed out

## Ask Stella

> This .dat file is from an old money program that's gone. Get my data out into a spreadsheet.

## An example chat

**You:** This .dat file is from an old money program that's gone. Get my data out into a spreadsheet.

**Stella:** On it. Working out how the file is laid out.

*Stella works on: Getting your TallyHome data out*
- Finding where each record starts
- Matching amounts, dates and payees
- Writing a converter for other files

**Stella:** Done. **household.csv** has all 223 transactions from Sep 2003 to Apr 2005, and March 2004 matches your printed register to the penny. tallyhome_to_csv.py converts any other TallyHome file.
Files: household.csv, tallyhome_to_csv.py

Works on Windows, Mac, Linux.

## Questions

**What if I don't know which program made it?**
That's fine. Stella works from the file itself.

**Which files does this work on?**
Data from old money, address book, photo and business programs, and many more.

**How do I open a .dat file?**
.dat only means data, so no single program opens them all. Give it to Stella and it works out what's inside.

**Is Stella free?**
Yes. Free with the ChatGPT or Claude plan you already have.

## By hand

1. Work on a copy, and gather anything showing the same data: a printout, an old export, a total you remember.
2. Open it in [ImHex](https://imhex.werwolv.net/) and find a name you know. Amounts are often whole pennies just before it.
3. Once one record makes sense, write a short script that reads them all and saves a CSV.

## Related

- [How to edit a save file (and keep the game loading it)](https://stella.sh/how/reverse-engineering/edit-save-file.md)
- [Convert bank statement PDFs to Excel](https://stella.sh/how/pdf-excel/bank-statement-pdf-to-excel.md)
- [Change dates in Excel from US to UK when they come out wrong](https://stella.sh/how/pdf-excel/fix-dates-in-excel.md)

Get Stella: https://stella.sh/download. Free with the ChatGPT or Claude plan you already have.
