> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Enable or Disable Word Wrap in VS Code
- URL: https://itsfoss.com/vs-code-word-wrap/
- Published: 2025-05-07T11:06:19.000Z
- Updated: 2025-05-07T11:06:19.000Z
- Description: Whether you’re reading long lines of code, markdown notes, or JSON files, knowing how to toggle word wrap on or off can save your eyes from endless horizontal scrolling.
- Author: Abhishek Kumar
- Tags: VS Code

W**ord 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.

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.

This is especially useful when:

- You're working on a small screen.
- You want cleaner screenshots of your code.
- You prefer not to lose track of long lines.

Now, let's see how to turn it on or off when needed.

## Method 1: The quickest toggle - Alt + Z

Yep, there’s a shortcut for it!

1. Open any file in VS Code.
2. Press `Alt + Z` on your keyboard.

![alt + z for quick word wrap](https://itsfoss.com/content/images/2025/04/alt-z-for-quick-word-wrap.gif)

And that’s it! Word wrap is toggled. Hit it again to switch it off.

## Method 2: Use the command palette

Prefer something a bit more visual? The Command Palette is your go-to.

1. Press `Ctrl + Shift + P` (or `Cmd + Shift + P` on macOS).
2. Type `Toggle Word Wrap`.
3. Click the option when it appears.

![command palette to toggle word wrap](https://itsfoss.com/content/images/2025/04/toggle-wordwrap.png)

This is ideal if you’re not sure of the shortcut or just want to double-check before toggling.

## Method 3: Set a default from settings

Want word wrap always on (or always off) when you open VS Code? You can change the default behavior.

1\. Go to `File > Preferences > Settings` 

![accessing settings pane](https://itsfoss.com/content/images/2025/04/settings-for-wordwrap.png)

2\. Search for “word wrap.”

3\. Under Editor: Word Wrap, choose from the following options:

  - `off`: Never wrap.
  - `on`: Always wrap.
  - `wordWrapColumn`: Wrap at a specific column number.
  - `bounded`: Wrap at viewport or column, whichever is smaller.

![setting up the default behavior of wordwrap from settings](https://itsfoss.com/content/images/2025/04/wordwrap-settings-default.png)

💡

****What’s “wordWrapColumn” anyway?**  
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.

You can also tweak `"editor.wordWrap"` in `settings.json` if you prefer working directly with config files.

## Wrapping up!

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 😄

We’ll continue exploring more quick yet powerful tips to help you make the most of VS Code.

Until then, go ahead and wrap those words your way.