We’ll continue exploring more quick yet powerful tips to help you make the most of VS Code.Now, let’s see how to turn it on or off when needed.Yep, there’s a shortcut for it!
- You’re working on a small screen.
- You want cleaner screenshots of your code.
- You prefer not to lose track of long lines.
Want word wrap always on (or always off) when you open VS Code? You can change the default behavior.
Table of Contents
Method 1: The quickest toggle – Alt + Z
1. Go to File > Preferences > Settings
- Open any file in VS Code.
- Press
Alt + Z
on your keyboard.

Word wrap automatically breaks a long line of text so it fits within your current editor window, without you needing to scroll horizontally. It doesn’t add line breaks to your file; it just wraps it visually.
Method 2: Use the command palette
This is especially useful when:
- Press
Ctrl + Shift + P
(orCmd + Shift + P
on macOS). - Type
Toggle Word Wrap
. - Click the option when it appears.

3. Under Editor: Word Wrap, choose from the following options:
Method 3: Set a default from settings
Picture this: You’re writing a long JavaScript function or a long SQL query. Without word wrap, you’d be endlessly dragging that horizontal scrollbar. With it, everything folds neatly within view.You can also tweak "editor.wordWrap"
in settings.json
if you prefer working directly with config files.

2. Search for “word wrap.”Word wrap might seem like a tiny detail, but it’s one of those “small things” that can make coding a lot more pleasant. Take the indentation settings for example, another crucial piece for code readability and collaboration. Yes, the tabs vs spaces debate lives on 😄
off
: Never wrap.on
: Always wrap.wordWrapColumn
: Wrap at a specific column number.bounded
: Wrap at viewport or column, whichever is smaller.

It lets you define a column (like 20) at which VS Code should wrap lines. Great for keeping things tidy in teams with coding standards.
Until then, go ahead and wrap those words your way.
Wrapping up!
Prefer something a bit more visual? The Command Palette is your go-to.And that’s it! Word wrap is toggled. Hit it again to switch it off.💡