To turn on word wrap in VS Code, press Alt + Z on Windows and Linux or Option + Z on a Mac. You can also click View > Word Wrap. Long lines then wrap to fit the editor window instead of running off the right edge. Press the shortcut again to turn it off. To keep it on for every file, set Editor: Word Wrap to on in Settings.
Below you’ll learn how to make word wrap permanent, wrap at a specific column, and turn it on only for certain languages like Markdown.
How to toggle word wrap
- Shortcut: Alt + Z (Windows and Linux) or Option + Z (Mac).
- Menu: Click View > Word Wrap.
- Command Palette: Press Ctrl + Shift + P, type Toggle Word Wrap, and press Enter.

The toggle applies to the current session. VS Code may reset it when you restart unless you change the setting below.
How to turn word wrap on permanently
- Press Ctrl + , (Command + , on Mac) to open Settings.
- Search for word wrap.
- Set Editor: Word Wrap to on.
Or add “editor.wordWrap”: “on” to your settings.json file.
Word wrap options explained
| Setting value | What it does |
|---|---|
| off | Lines never wrap (default) |
| on | Lines wrap at the edge of the editor window |
| wordWrapColumn | Lines wrap at the column set in Editor: Word Wrap Column (80 by default) |
| bounded | Lines wrap at the window edge or the wrap column, whichever comes first |
How to turn on word wrap for one language
To wrap only Markdown or plain text files, add this to settings.json:
“[markdown]”: { “editor.wordWrap”: “on” }
Replace markdown with another language ID, like plaintext.
Word wrap vs. formatting
Word wrap only changes how lines are displayed. It doesn’t add line breaks to your file. To actually break long lines, use a formatter (like Prettier for code) or an extension that rewraps text.
Related: insert code in Google Docs.
Related: install IntelliJ IDEA on Windows 11.
Related: replace a word in VS Code.
Related: best code editors for Mac.
Related: Download and install VS Code on Windows 11.
Frequently asked questions
Why doesn’t Alt + Z work?
Another extension or keyboard layout may use that shortcut. Open File > Preferences > Keyboard Shortcuts, search for Toggle Word Wrap, and assign a new shortcut.
How do I wrap text in the VS Code terminal?
The integrated terminal wraps long lines automatically. Resize the panel to see more.
Can I show a guide line at 80 characters?
Yes. Add “editor.rulers”: [80] to settings.json.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.