How to Edit User Settings in VS Code (settings.json)
Open both the visual settings UI and the raw settings.json file, change common options safely, and understand where your settings actually live.
Almost everything in VS Code is configurable, from font size to how files are saved. There are two ways to change settings: a searchable visual UI and a raw JSON file. Knowing both lets you tweak things quickly and copy configurations between machines. This guide shows where settings live and how to edit them without breaking anything.
What you need
- VS Code installed
- A few minutes
Step 1: Open the Settings UI
Press Ctrl+, (Cmd+, on macOS) to open Settings. There is a search box at the top; type what you want, such as font size, and the matching options appear. This UI is the safest way to change a single setting because it validates your input.
Step 2: Switch to the raw JSON file
For bulk changes or to copy a config, edit the JSON directly. Open the Command Palette with Ctrl+Shift+P, type Open User Settings (JSON), and press Enter. The file opens; every setting you change in the UI is stored here.
Step 3: Add common settings
Each setting is a key and value pair. Add the entries below to format on save, trim trailing whitespace, and set a comfortable tab size. Separate entries with commas and keep the outer braces.
{
"editor.fontSize": 14,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"files.trimTrailingWhitespace": true,
"files.autoSave": "onFocusChange"
}Step 4: Know User vs Workspace settings
User settings apply to every project you open. Workspace settings live in a .vscode/settings.json file inside one project and only affect that project, overriding your user settings. Use workspace settings when a team needs the same config; use user settings for your personal preferences.
Result
You can now change any VS Code option through the UI or by editing settings.json directly, and you know whether a setting belongs to you personally or to a shared project.
Watch related tutorials
1:42:18
28:14
41:09
9:47
8:23
52:31