iMessage Exporter is a free tool for Mac that can back up your text messages (and iMessages). It creates a local backup with your full conversation history that you can search and read through.
iMessage Exporter saves your messages in a rich file format that looks like a regular iMessage thread and allows you to include all attachments and pictures for maximum backup.
If you back up your messages to a Mac, then you can comfortably delete your old messages from your phone, saving space
You might already back up your messages in iCloud, but Apple charges an arm and a leg for space. You can save space (and money) by making a local backup and clearing out your cloud storage.
To download the iMessage Exporter, go to GitHub’s Releases page. It is more complicated than downloading an app, but the article provides a step-by-step guide to running it on Mac.
After making your local iMessage archive, to free up some iCloud space; Open Messages and go to Messages > Settings and just change the Keep Messages setting to One Year.
If you mess up and want to run iMessage Exporter again with different settings, or you don’t think you need the backup, you can delete the backup file you created.
The tool saves in your Home folder by default, and you can drag the imessage_export folder to the Trash and empty it.
iMessage Exporter can't pull in contact names, using the Mac Terminal is challenging for those who are not fluent in command-line interfaces.
However, this open-source tool indeed offers a quick and easy way to back up your messages without paying Apple for storage.