VS Code User Settings vs Workspace Settings: What Is the Difference?

User settings apply everywhere. Workspace settings apply to one project. Learn when to use each, where they are stored, and how they interact.

5 min read

User settings apply to every VS Code window you open. Workspace settings apply only to one project. When both define the same key, the workspace value wins.

This means you can keep your personal defaults in user settings. You only override what a specific project needs in workspace settings. You never touch your global setup for one project's rules.

Understanding this difference helps you decide where to put each setting. The current VS Code settings documentation also describes profile, remote, language-specific, and policy scopes that can affect the final value.

Main difference at a glance

User SettingsWorkspace Settings
ScopeEvery VS Code windowOne project or workspace
Stored inYour current profile.vscode/settings.json or a .code-workspace file
Shared with teamNo, unless Settings Sync is enabledOnly if reviewed and committed to version control
OverridesDefault settings onlyUser settings
Security-sensitive settingsAllowedBlocked (git.path, terminal shells)

Where settings are stored

The default profile's user settings live in a platform-specific folder:

  • Windows: %APPDATA%\Code\User\settings.json
  • macOS: $HOME/Library/Application Support/Code/User/settings.json
  • Linux: $HOME/.config/Code/User/settings.json

Workspace settings live inside your project at .vscode/settings.json. If you are using a multi-root workspace, the settings are stored inside the .code-workspace file instead.

If you switch to a non-default VS Code profile, that profile has its own user settings under the User/profiles/<profile ID> directory. Open settings through VS Code when possible so you edit the active profile rather than the wrong file on disk.

How to open each scope

Open user settings

Press Ctrl+, (Windows/Linux) or Cmd+, (macOS). In the Settings editor, make sure the User tab is selected at the top.

Alternatively, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run Preferences: Open User Settings.

Open workspace settings

In the Settings editor, select the Workspace tab at the top.

The Workspace tab only appears when you have a folder or workspace open. If no folder is open, the tab is hidden.

Edit the JSON file directly

For user settings JSON, run Preferences: Open User Settings (JSON) from the Command Palette. For workspace settings JSON, run Preferences: Open Workspace Settings (JSON).

How precedence works

VS Code layers settings in a specific order. Each layer overrides the ones before it.

OrderLayer
1Default settings (built into VS Code)
2User settings (your global preferences)
3Remote settings (when connected to SSH, WSL, or a container)
4Workspace settings (the open project)
5Workspace folder settings (per-folder overrides in multi-root workspaces)
6Language-specific default settings
7Language-specific user settings
8Language-specific remote settings
9Language-specific workspace settings
10Language-specific workspace folder settings
11Policy settings (set by your organization, always wins)

The result is that a workspace setting for Editor: Tab Size will override your user setting for the same key. But if you have not set it in workspace settings, your user value is used.

Settings that cannot be workspace-scoped

For security, VS Code blocks certain settings from being defined at the workspace level:

  • git.path
  • terminal.external.windowsExec
  • terminal.external.osxExec
  • terminal.external.linuxExec

The first time you open a workspace that tries to set these, VS Code shows a warning and ignores the values. This prevents a project you downloaded from redirecting your Git or terminal to an unexpected executable.

When to use user settings

Use user settings for preferences that are about you, not about the project:

  • Editor font family and size
  • Color theme and file icon theme
  • Cursor style and blinking
  • Whether the minimap is visible
  • Keyboard shortcut preferences that affect your workflow

These settings make VS Code feel comfortable to you regardless of what project you are working on.

When to use workspace settings

Use workspace settings for rules that the project needs, regardless of who opens it:

  • Indentation size and tabs vs spaces
  • Which formatter to use for each language
  • Files and folders to exclude from search and the Explorer
  • Language-specific linting and formatting rules
  • Formatter or linter settings when the team uses the required extension

Because workspace settings live in the .vscode folder, you can commit them to Git. Every contributor gets the same project rules automatically.

Override a user setting for one project

A common workflow: you prefer 2-space indentation everywhere, but one Python project requires 4 spaces.

Keep your user setting as 2 spaces by adding this line to your global settings.json:

jsonjson
{
  "editor.tabSize": 2
}

Now open the Python project. Inside its .vscode/settings.json file, add a workspace-level override that sets the tab size to 4 spaces instead:

jsonjson
{
  "editor.detectIndentation": false,
  "editor.tabSize": 4
}

When you open that project, the Status Bar indentation control shows Spaces: 4 for the active file. In other projects, your 2-space user default still applies. Disabling indentation detection in this workspace prevents an existing file's detected indentation from replacing the configured tab size.

Check which scope a setting uses

Select the User or Workspace tab in the Settings editor, then enter @modified in the search bar. The results show settings explicitly changed in that selected scope, and each modified row has a colored bar on the left.

Next steps

Now that you understand the difference, learn how to open and edit settings.json directly. If you work on multiple types of projects, VS Code profiles let you switch entire sets of settings at once.

Rune AI

Rune AI

Key Insights

  • User settings apply across VS Code windows that use the same profile.
  • Workspace settings apply only to the open project and override non-language-specific user settings.
  • Single-folder workspace settings live in .vscode/settings.json and can be reviewed and committed to Git.
  • Security-sensitive executable paths such as git.path are user-only.
  • Language-specific settings have their own precedence at user, remote, workspace, and folder scopes.
RunePowered by Rune AI

Frequently Asked Questions

Can I use both user and workspace settings at the same time?

Yes. VS Code combines them. Workspace settings override user settings when both scopes set the same key. This lets you keep personal defaults in user settings and override only what a project needs.

Where are workspace settings stored on disk?

For a single-folder workspace, they are in .vscode/settings.json at the project root. For a multi-root workspace, workspace-wide settings are inside the .code-workspace file, while each root folder can also have folder settings.

What happens if I remove my workspace settings?

VS Code falls back to settings from broader scopes, including user settings. Back up the file or commit it to version control before removing it if you might need the project-specific values again.

Conclusion

Use user settings for preferences you want everywhere: font size, theme, and general editor behavior. Use workspace settings for project-specific rules like indentation, formatting, and file exclusions. The two scopes work together so you never have to duplicate your entire configuration for one project.