Visual Studio and VS Code passed 50 million monthly active developers in 2025, according to Microsoft. That’s a lot of people staring at the same editor, and most of them never touch the file that actually controls it.
settings.json sits underneath the Settings UI, quiet and mostly ignored. It’s where every real customization lives: the language-specific formatting rule you can’t find in a menu, the color override that only exists as raw text.
Miss the right way in and you’ll spend ten minutes clicking through menus looking for a setting that doesn’t have a UI toggle. Once you know where the file lives, it’s one keyboard shortcut away, every time.
What Is settings.json

Every editor preference in VS Code, from font size to which extensions get language-specific overrides, gets written to one file behind the scenes. That file is settings.json, a JSON configuration file holding the user and workspace preferences for the editor.
Font size, theme, auto-save behavior, which extensions get language-specific treatment: settings.json controls basically all of it.
- Editor appearance (font size, themes, layout)
- Formatting and auto-save rules
- Extension settings and language-specific overrides
Stack Overflow’s 2024 Developer Survey found 74% of professional developers use Visual Studio Code as their primary editor. That share grew to 75.9% by the 2025 survey (Stack Overflow, 2025).
The graphical Settings editor is really just a front end for this file. Change something in the UI and settings.json updates behind the scenes without you ever seeing it happen. Edit settings.json directly and the UI reflects it too, the two stay in sync automatically.
Technically, the file isn’t strict JSON. VS Code treats it as JSONC (JSON with Comments), which is why you can drop a // note between entries without breaking anything.
Where Is settings.json Located

The default user settings.json path changes depending on your operating system.
Workspace-level settings live somewhere else entirely: inside a .vscode folder at the root of your project.
| Operating System | User settings.json Path |
|---|---|
| Windows | %APPDATA%\Code\User\settings.json |
| macOS | $HOME/Library/Application Support/Code/User/settings.json |
| Linux | $HOME/.config/Code/User/settings.json |
These paths come straight from Microsoft’s official settings documentation (VS Code Docs).
Windows File Path
Windows keeps it at %APPDATA%\Code\User\settings.json. If you’re not sure where %APPDATA% actually points, it’s usually C:\Users\yourname\AppData\Roaming.
macOS File Path
On a Mac you’ll find it at $HOME/Library/Application Support/Code/User/settings.json, but good luck browsing there in Finder. The Library folder is hidden by default, so the Command Palette method below is usually faster anyway.
Linux File Path
$HOME/.config/Code/User/settings.json is where it lives on Linux, following the standard XDG config directory convention. One exception worth knowing: running VS Code in portable mode moves the file into a data folder next to the executable instead.
How to Open settings.json From the Command Palette
The Command Palette is the fastest way to open settings.json, and it’s the method Microsoft’s own documentation leads with.
Press Ctrl+Shift+P on Windows or Linux, or Cmd+Shift+P on macOS, then type the command name.
Type Preferences: Open User Settings (JSON) and hit enter, that’s the one that opens your global settings.json file.
Working inside a specific project? Preferences: Open Workspace Settings (JSON) gets you the .vscode/settings.json file for that folder instead.
There’s also Preferences: Open Application Settings (JSON), which pulls up the default profile’s settings.json. You’ll only ever need this one if you’re juggling multiple VS Code profiles, and most people aren’t.
One distinction trips people up. “Preferences: Open User Settings” without “(JSON)” opens the graphical editor instead, while adding “(JSON)” to the command name gets you the raw file (VS Code Docs).
How to Open settings.json From the Settings UI

The Settings UI is the point-and-click alternative to the Command Palette, reached through the gear icon or the Preferences menu.
- Click the gear icon in the bottom-left corner of the sidebar, then select Settings
- Or go to File > Preferences > Settings (Code > Preferences > Settings on macOS)
Either path opens the graphical Settings interface, not the JSON file itself.
Look for the {} icon in the top-right corner of the Settings tab. Clicking it switches you straight into settings.json, and VS Code generates the file automatically if one doesn’t exist yet.
Prefer to skip the graphical editor entirely? Set workbench.settings.editor to json, and both the menu path and the Ctrl+, shortcut open settings.json directly from then on (VS Code Docs).
How to Open settings.json With a Keyboard Shortcut
There’s no default shortcut for this. VS Code ships without one.
Ctrl+, (Cmd+, on a Mac) gets you the Settings UI, not the file itself. If you want a single keystroke that jumps straight to settings.json, you have to build it yourself.
Open the Command Palette and run Preferences: Open Keyboard Shortcuts (JSON), which opens keybindings.json. Add a new entry bound to the workbench.action.openSettingsJson command, something like this:
{ "key": "ctrl+shift+comma", "command": "workbench.action.openSettingsJson" }
Save that, and the combination works from anywhere in the editor. No Command Palette, no clicking through the Settings UI, just the keys.
How to Open settings.json From the Terminal
There’s no dedicated settings command for the terminal. You’re really just using the code command-line interface, VS Code’s built-in CLI, and pointing it at a file path.
The code executable has to be on your system PATH first. Windows and Linux installers handle this automatically, according to VS Code’s official CLI documentation. macOS doesn’t. You’ll need to run “Shell Command: Install ‘code’ command in PATH” from the Command Palette once before any of this works.
After that, you can open VS Code from any terminal window and just point the code command at the settings.json path.
Windows Command Prompt / PowerShell
Run code %APPDATA%\Code\User\settings.json from Command Prompt or PowerShell, either one works the same way here.
That opens the file directly, in a new or existing VS Code window depending on which launch flags you’re using.
macOS and Linux Terminal
On macOS: code “$HOME/Library/Application Support/Code/User/settings.json”.
On Linux, swap in $HOME/.config/Code/User/settings.json and you’re done.
User Settings vs Workspace Settings vs Folder Settings
User settings are global. They follow you into every VS Code window regardless of what project is open. Workspace settings are scoped tighter, just the current project, and they win whenever the two disagree.
Multi-root workspace? There’s a third layer. Folder settings apply to a single folder inside that workspace, narrower still.
| Scope | Applies To | Overrides |
|---|---|---|
| Default | Unconfigured baseline | Nothing |
| User | Every VS Code window | Default settings |
| Workspace | The open project | User settings |
| Workspace Folder | One folder in a multi-root setup | Workspace settings |
Microsoft’s official settings documentation lists this exact precedence order, with Remote settings and language-specific settings adding further layers on top (VS Code Docs).
Some settings refuse to move to workspace scope no matter what you try. git.path, terminal.external.windowsExec, terminal.external.osxExec, and terminal.external.linuxExec all stay locked to the user level for security reasons, mostly to stop a malicious workspace file from silently swapping out what terminal or git binary you’re running. VS Code warns you once and then permanently ignores any workspace-level attempt to set them.
Microsoft’s own vscode repository puts this into practice. Its .vscode/settings.json sets git.branchProtection rules and other project-specific settings for contributors, all shared through version control instead of living in anyone’s personal user settings.
How to Edit settings.json Directly

Settings inside the file follow a simple key-value structure: a setting ID in quotes, a colon, then a value.
A single entry looks like “editor.fontSize”: 14, with a comma separating it from the next property.
The file gets full IntelliSense support, according to VS Code’s JSON language documentation, which matters more than it sounds once you’re editing raw text instead of clicking toggles.
- Autocomplete for setting names and their accepted values
- Hover descriptions explaining what each setting does
- Structural validation against VS Code’s own JSON schema
Want to bump the text size instead of typing raw numbers? Changing the font in VS Code walks through the exact property names for size and family.
Format the whole file at once with VS Code’s auto-format command, which cleans up indentation and spacing without touching the values themselves.
Comments still work here too. A // note above a setting explains why it’s there, which matters once the file grows past a dozen entries and you’ve forgotten why half of them exist.
Common Mistakes When Editing settings.json
Manual edits go wrong in a handful of predictable ways, and VS Code flags most of them with red error squiggles before you even hit save.
| Mistake | Symptom | Fix |
|---|---|---|
| Trailing comma | Settings UI won’t save changes | Remove the comma after the last property |
| Mismatched braces | File-wide red squiggle, nothing loads | Count opening and closing braces |
| Duplicate keys | No error, but one value silently wins | Search the file for the setting name |
| Single quotes | “Property keys must be quoted” error | Switch to double quotes |
Trailing commas cause more damage than they look like they should. Microsoft’s own vscode repository documented this in a 2018 bug report: a comma after the last property in settings.json triggered “Unable to write into user settings” every time someone tried to change anything through the Settings UI (microsoft/vscode, GitHub Issue #61341).
That exact error message is still the one VS Code shows today, according to the official settings documentation’s troubleshooting section.
Duplicate keys are the sneakiest mistake on this list. JSON doesn’t reject repeated property names, so VS Code just applies whichever one appears last in the file and ignores the first one without telling you.
What to Do When settings.json Does Not Open or Is Missing

Sometimes the file just isn’t there yet. A fresh VS Code install has no settings.json until you actually change something, running Preferences: Open User Settings (JSON) will generate an empty one for you automatically.
If the JSON itself is broken, the editor still opens the file, but you’ll get a message along the lines of “Unable to write into user settings. Please open user settings to correct errors/warnings in it and try again,” and it sticks around until the syntax gets fixed (VS Code Docs).
Permission problems show up too, though less often. Microsoft’s own Q&A forum has cases of VS Code throwing an EPERM error trying to write to paths like C:\Users\username\AppData\Roaming\Code, usually blocked by restrictive folder permissions (Microsoft Q&A, 2023). Running the editor as administrator, or giving the current user full control over that folder, fixed it in those reports.
Extensions can quietly cause the exact same symptoms. Some write their own entries into settings.json the moment they activate, and if two extensions target the same setting ID, one overwrites the other with no warning at all. From the outside it looks identical to a manual duplicate-key mistake.
How to Reset settings.json to Default

Two reset methods exist, and they work at completely different scales.
Resetting one setting is easy. Hover over it in the Settings UI, click the gear icon that shows up, and pick Reset Setting. That value goes back to default, nothing else changes.
Wiping the whole file is more drastic. Open settings.json, delete everything between the outer curly braces, and save. Every customization you’ve ever made disappears, and VS Code rebuilds its defaults from nothing.
There’s no undo for the second option. VS Code’s own documentation warns there’s no way to recover previous values once that save happens, so backing up the file first is worth the extra minute.
How to Sync settings.json Across Devices

Settings Sync shares settings.json, keyboard shortcuts, and more across every machine signed into the same account.
Turn it on through the Backup and Sync Settings command in the Accounts menu at the bottom of the Activity Bar, then sign in with a GitHub or Microsoft account (VS Code Docs).
- Settings
- Keyboard shortcuts
- User snippets and user tasks
- UI state (layout, activity bar, recent commands)
- Extensions and profiles
Sign into a second machine that’s already synced, and you’ll be asked to pick one of three approaches, according to the official Settings Sync guide.
Merge combines whatever’s local with whatever’s already sitting in the cloud. Replace Local throws out the local machine’s settings entirely and pulls down the cloud version. The third option, Merge Manually, opens a side-by-side view so you can go through conflicting settings one at a time, which is worth doing if you actually care which version wins for each one.
| Conflict Option | Effect |
|---|---|
| Accept Local | Overwrites the cloud with your local settings.json |
| Accept Remote | Overwrites local settings.json with the cloud version |
| Show Conflicts | Opens a diff view to resolve line by line |
Backups protect against a bad sync. Local backups are deleted automatically after 30 days, while the cloud keeps the latest 20 versions of each individual file (VS Code Docs).
GitHub extended this further in 2023, adding two-way Settings Sync between Codespaces and VS Code for the Web (GitHub Changelog, 2023).
Authentication itself got a rework in version 1.80, when VS Code moved from the archived keytar library to Electron’s safeStorage API for encrypting sign-in credentials on desktop.
FAQ on How To Open Settings.Json In Vscode
What’s the difference between settings.json and keybindings.json?
settings.json stores editor preferences like font size and formatting rules. keybindings.json stores custom keyboard shortcuts instead, each entry pairing a key combination with a command and an optional when clause that limits where it fires.
Do VS Code Stable and Insiders share the same settings.json?
No. Stable and Insiders are separate installs with separate local files. Settings Sync also uses different sync services for each by default, so changes made in one build don’t automatically carry over to the other.
Where is settings.json stored for a VS Code profile?
Profile settings live under Code\User\profiles\\settings.json on Windows, with matching paths under Library/Application Support and .config on macOS and Linux. VS Code only creates this file once you change a setting inside that specific profile.
Does deleting settings.json remove my installed extensions?
No. settings.json only stores configuration values. Your installed extensions live in a separate folder entirely, so clearing or deleting the file resets your preferences without touching which extensions are installed or enabled.
What does the @modified filter do in the Settings editor?
Typing @modified into the Settings UI search bar shows only the settings you’ve changed from their defaults. It’s a fast way to audit customizations without scrolling through settings.json line by line.
Does turning off Settings Sync delete my local settings.json?
No. Running Settings Sync: Turn off from the Command Palette stops synchronization but leaves your local settings.json exactly as it was. Only the cloud connection is severed, not the file itself.
Do extensions automatically add entries to settings.json?
Some do, usually ones managing linters or formatters that need a toggle saved somewhere. Most extensions only contribute default values and schema definitions, appearing under Settings without ever writing directly into your file.
Where do workspace settings live in a multi-root workspace?
Workspace-wide settings sit inside the .code-workspace configuration file itself, not a shared settings.json. Individual folders inside that workspace can still keep their own .vscode/settings.json for folder-level scope.
Do I need to restart VS Code after editing settings.json?
Usually not. Most changes apply the moment you save the file. A smaller set, mostly ones tied to extensions, only take effect after reloading the window, which VS Code prompts you to do.
Can I configure settings for multiple languages in one block?
Yes. A block like “[javascript][typescript]” applies the same values to both languages at once. If a setting also exists in a single-language block, the single-language version wins over the combined one.
Conclusion
If you only remember one way in, make it the Command Palette. It works the same on Windows, macOS, and Linux, so it’s the one method that doesn’t change depending on which machine you’re sitting at.
Terminal access and the gear icon in the Settings UI are both fine shortcuts once you’re used to them, but they’re not what you reach for first when you’re on someone else’s laptop.
Back up settings.json before you turn on Settings Sync for the first time. Accept a merge conflict in a hurry and you can lose months of tuned preferences to someone else’s defaults, and there’s no undo once that happens.
Add one setting today. A font tweak, a keybinding tied to workbench.action.openSettingsJson, whatever’s been bugging you for weeks. Files that get edited regularly stay clean. The ones people touch twice a year end up full of duplicate keys nobody remembers writing.
- C++ Cheat Sheet - August 28, 2026
- How to Connect to a GitHub Repository From VS Code - August 26, 2026
- C/C++ Test Automation and Static Code Analysis: A Practical Guide to Shipping Reliable Software - August 26, 2026



