The VS Code settings.json file stores the setting values you configure. Open it directly with Preferences: Open User Settings (JSON), or use the graphical Settings editor if you do not know the exact setting ID.
The official VS Code settings guide documents the current scopes, commands, and file locations.
Open the Settings editor
The Settings editor is the visual way to browse and change settings. It is the easiest path for beginners.
Press Ctrl+, on Windows and Linux, or Cmd+, on macOS.
The Settings editor opens with a search bar at the top and settings grouped by category. You can search for any setting by name or description.
At the top of the editor, two tabs let you switch scope:
- User: settings for the current profile
- Workspace: settings for the current project (available when a folder or workspace is open)
Any change you make in the Settings editor is written to the underlying settings.json file automatically.
Open settings.json directly
If you prefer editing JSON, or if you need to set values that the Settings editor does not expose, open the JSON file directly.
Open the Command Palette
Press Ctrl+Shift+P on Windows and Linux, or Cmd+Shift+P on macOS.
Run the JSON open command
Type Preferences: Open User Settings (JSON) and press Enter. This opens your user settings.json file as an editor tab.
For workspace settings, use the workspace command
Run Preferences: Open Workspace Settings (JSON) instead. This opens the project's .vscode/settings.json. If the file does not exist yet, VS Code creates it.
The JSON file opens with full IntelliSense. Start typing a setting name and VS Code suggests completions. Hover over any setting to see its description and default value.
Switch the default to JSON
If you prefer working in JSON all the time, you can make the Settings editor open settings.json by default instead of the graphical UI.
Open your user settings JSON and add:
{
"workbench.settings.editor": "json"
}Now Ctrl+, / Cmd+, opens settings.json directly. To switch back, remove the line or change the value to "ui".
Open settings.json from disk
Sometimes you need to access the file outside of VS Code, for example to back it up or edit it in another editor.
The default profile's user settings.json file is located at:
- Windows: %APPDATA%\Code\User\settings.json
- macOS: $HOME/Library/Application Support/Code/User/settings.json
- Linux: $HOME/.config/Code/User/settings.json
The workspace settings.json is at .vscode/settings.json inside your project folder.
If you use VS Code Insiders, replace Code with Code - Insiders in the paths above.
A non-default profile stores its settings under User/profiles/<profile ID>/settings.json. Use Preferences: Open User Settings (JSON) to avoid editing a different profile's file by mistake.
Add a setting in JSON
In settings.json, each setting is a key-value pair inside the top-level curly braces. Settings are separated by commas.
To add a setting, place your cursor inside the top-level braces and start typing. IntelliSense shows available settings. Select one and set its value.
For example, to change the editor font size:
{
"editor.fontSize": 16
}VS Code applies changes as soon as you save the file. You do not need to restart.
Understand what the colored bars mean
In the Settings editor, a colored vertical bar appears next to a setting changed from its default. Select the User or Workspace tab to see which scope you are reviewing.
In the JSON file, you can see the same information by noting which file you have open. User settings are in the current profile's file. Workspace settings are in the project's .vscode/settings.json.
Fix a broken settings.json
If you see the error "Unable to write into user settings" when trying to change a setting, the settings file has a syntax error. Common causes:
- A missing comma between two settings
- A missing or extra brace, bracket, comma, or quotation mark
- An unquoted setting name or string value
VS Code parses settings.json as JSON with Comments, so comments and trailing commas are accepted. Red squiggles still identify malformed structure and unsupported values.
Open the file with Preferences: Open User Settings (JSON). VS Code underlines errors with red squiggles. Fix the problem and save.
Reset all settings
To return VS Code to its default state, open your user settings file and copy its contents somewhere safe first so you can restore any setting you still want. Then delete everything between the curly braces and save. Broader defaults apply again, but workspace, remote, language-specific, and policy values can still override them.
If you only want to reset one setting, find it in the Settings editor, click the gear icon next to it, and select Reset Setting.
Next steps
Knowing how to reach settings.json is the first step. Next, see the difference between user and workspace settings so you know which file to edit for each task. To make your editor more productive, check out 25 of the best VS Code settings.
Rune AI
Key Insights
- Open the Settings editor with Ctrl+, (Windows/Linux) or Cmd+, (macOS).
- Open user settings.json directly with Preferences: Open User Settings (JSON) in the Command Palette.
- Open workspace settings.json with Preferences: Open Workspace Settings (JSON). Only available when a folder is open.
- The settings.json file has full IntelliSense: autocomplete for setting names and values, plus descriptions on hover.
- If you prefer always working in JSON, set workbench.settings.editor to json.
Frequently Asked Questions
What is the difference between User and Workspace settings.json?
Why can I not find the Workspace tab in the Settings editor?
How do I reset my user settings to defaults?
Conclusion
You can open settings.json through the Settings editor UI, Command Palette commands, or directly from disk. The Settings editor is easier for browsing. The JSON file is faster when you know the exact setting ID. Pick whichever works for the task.
More in this topic
How to Use VS Code with WSL 2 on Windows
Run VS Code connected to Windows Subsystem for Linux so you can develop in a full Linux environment with native tools, terminals, and debugging, all from Windows.
20 Best VS Code Extensions for Web Developers in 2026
Twenty carefully chosen VS Code extensions every web developer should know. Covers formatting, linting, frameworks, debugging, Git, and developer experience.
How to Install, Disable, Update, and Uninstall VS Code Extensions
Learn how to install, disable, update, and uninstall VS Code extensions from the Marketplace and the command line. Step-by-step instructions for every action.