How to Stop Double-Space Adding a Period on Mac
Type two spaces in a row and macOS quietly replaces them with a period and a space — a habit it picked up from the iPhone. If you write code, take fast notes, or just like double-spacing after sentences, the substitution feels like the Mac fighting you. It's one toggle to turn off.
Turn it off in System Settings
- Open System Settings → Keyboard.
- In the Text Input section, click Edit… next to Input Sources.
- Make sure All Input Sources is selected in the sidebar.
- Turn off Add period with double-space.
- Click Done.
The steps are identical on macOS 13 Ventura, 14 Sonoma, and 15 Sequoia. The change takes effect right away in most apps; anything already running that still substitutes will behave after a relaunch.
To undo, flip the same toggle back on. Nothing else about your typing setup changes.
The same switch from Terminal
The setting is a standard global preference, so you can script it — useful when setting up a new Mac:
# stop double-space inserting a period
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
# undo — restore the default behavior
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool true
Apps read this preference at launch, so quit and reopen an app (or log out and back in) to see it apply everywhere. The Settings checkbox and this key are the same switch — flip either one.
While you're in that sheet
The Edit… sheet is where all of macOS's typing substitutions live, and they're worth a look while you have it open:
- Correct spelling automatically — system-wide autocorrect.
- Capitalize words automatically — auto-capitals after sentence breaks.
- Show inline predictive text — the grey suggested words (Sonoma and later).
- Use smart quotes and dashes — turns straight quotes into curly ones and
--into an em dash. The classic saboteur of code snippets pasted into documents.
Coders often turn off the whole block; writers usually keep smart quotes and drop the double-space period. They're independent — mix freely.
Worth knowing where these substitutions actually fire: they belong to the macOS text system, so they act in Notes, Mail, Messages, TextEdit, Pages, and most Mac-native apps. Serious code editors — VS Code, JetBrains IDEs, terminal editors — use their own text engines and never applied the double-space period in the first place. So if you code in a real editor but draft commit messages or documentation in Notes, the substitution only ever bit you in Notes; turning it off makes the two environments finally behave the same.
This is per-Mac (and your iPhone has the same setting)
Text Input toggles don't sync over iCloud, so if you have two Macs, change both. And since the double-space period came from iOS, you may want to match your phone: on iPhone or iPad it's Settings → General → Keyboard → “.” Shortcut. Turning it off in both places keeps your muscle memory consistent — otherwise you'll stop expecting periods on the Mac and keep getting them in texts.
One distinction worth knowing: this feature only fires when you type two spaces quickly after a word. Deliberate double spaces while aligning text mid-line generally survive. If you're seeing other unwanted rewrites — capitals appearing, spellings changing — that's autocorrect, not the period shortcut, and it has its own toggle in the same sheet. And if a rogue period has already landed, Cmd+Z immediately after the substitution undoes it and restores your two spaces — a decent stopgap on a Mac you can't reconfigure.
Mainspring turns 90+ hidden macOS settings — typing substitutions included — into labelled, reversible toggles, so you never have to remember which sheet a checkbox hides in.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once
Tame the rest of auto-typing
If double-space periods annoyed you, system-wide autocorrect probably does too — see how to turn off autocorrect on Mac for the full sweep of substitution settings.