If you didn't use iCloud, the notes are stored in: ~/Library/Group Containers/group.com.apple.notes/ in a database file named NoteStore.sqlite

If you used iCloud, your notes are stored at:

~/Library/Containers/com.apple.Notes/Data/CloudKit/

To view the Notes you need an SQL app or typing sqlite at the command line.

  • https://github.com/jakwings/mac-notes-exporter