Where apps hide your files
Your shortcuts and their phrases sit in a small SQLite database in your Library. The safe way to back them up is Apple's drag-out export, and copying the database is the fallback.
~/Library/KeyboardServices/TextReplacements.db
Next to it you will usually see two sidecar files, TextReplacements.db-shm and TextReplacements.db-wal. They are part of the same database, so keep the three together if you copy it. Open the folder with:
open ~/Library/KeyboardServices
In recent macOS versions the entries live in this database; much older releases kept them in the global preferences file. You will also see a small com.apple.textInput.keyboardServices.textReplacement.plist in ~/Library/Preferences. On the Mac checked it was under a kilobyte and had been updated recently, so macOS still uses it, but your list is in the database. Leave both alone.
Apple's own guide for moving replacements between Macs uses a drag export:
property list.plist. Copy it somewhere safe, or send it to another Mac.To import, open the same Text Replacements window on the other Mac, drag the .plist onto it and click Done.
Two cautions. Apple says you can edit the file in TextEdit before importing, but a malformed file may import badly or not at all. TidBITS also reported in 2026 that files of about 1,000 entries imported unpredictably while files of about 100 usually worked, so split a large set and test with a copy. And the exact wording of the settings menu can change between macOS 26 Tahoe, Sequoia 15 and Sonoma 14, so if you cannot find Text Replacements in the Keyboard pane, search for it in System Settings.
If the app route fails, copy the files. Do this with the data at rest:
~/Library/KeyboardServices.TextReplacements.db and its -shm and -wal files to a backup folder, all three together.Copy, never move. A restore made by overwriting the live database on a running system may be undone when the keyboard service writes to it again, so for a restore, prefer the drag import, which goes through the supported route. To look inside a copy without touching the original, open the copy, never the live file, in read-only mode. This lists its table names (adjust the folder to where you put the copy):
sqlite3 -readonly ~/Desktop/TextReplacements-backup/TextReplacements.db '.tables'
Apple's guide says text replacements stay up to date across your devices when each one is signed in to the same Apple Account with iCloud Drive turned on, so a new Mac often fills them in on its own after a while. That makes the database a local copy of an account-wide list. If you delete entries on one device, expect them to disappear from the others too.
If replacements are missing on a new Mac, check that iCloud Drive is on and give it time. A manual import is faster, though TidBITS found that sync does not always reconcile cleanly after large imports.
If you look at the file's modified date, it may be older than your last edit. Recent changes may be sitting in the -wal file, which holds writes until the database is tidied up. That is normal. It is also why copying only the .db file is not enough.
The files are tiny: on the Mac checked, the three together came to about 240 KB. Nothing here is worth cleaning.
To remove all text replacements, delete them in System Settings: select all entries and remove them with the minus (−) button under the list. Deleting the database file by hand while the keyboard service is running can leave it in an odd state, and it also would not clear what iCloud holds. If you still want to reset the local file, quit apps, move the three files to the Trash from Finder and restart. Export a plist first.
Learned words are a different feature, stored in a separate text file: see the spelling dictionary location. Snippets from third-party text expanders live in each app's own folder and are not part of this database.
If a shortcut does nothing after an import, the usual causes are outside the database. Apple notes that text replacements are not available in all apps, and in apps that do support them the feature can be switched off per app: choose Edit > Substitutions and make sure Text Replacement has a tick. The shortcut can also clash with another one. Test in TextEdit first. If it works there, the database is fine and the problem is the app.
The KeyboardServices folder is inside your hidden Library, which Spotlight does not search, so your own search for it tends to return nothing. Everywhere finds files there by name: type TextReplacements and the database shows up with both sidecar files, and ⌘↵ reveals them in Finder. Type property list to find that exported file if it got lost on a cluttered Desktop, a folder Everywhere can see once you grant it Full Disk Access. It searches file names only, so it will not show the shortcuts themselves.
In ~/Library/KeyboardServices/TextReplacements.db, with sidecar files TextReplacements.db-shm and TextReplacements.db-wal beside it.
Open System Settings, click Keyboard, then Text Replacements. Select the entries, drag them to the Desktop, and macOS creates a property list.plist file you can keep as a backup.
Open Text Replacements on that Mac, drag the .plist file onto the window and click Done.
Yes. Apple says they stay up to date across devices signed in to the same Apple Account with iCloud Drive turned on, so a new Mac may fill them in by itself.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised