Format bash, sh, zsh, bats and mksh scripts in VS Code with shfmt built in. The shfmt engine ships inside the extension as WebAssembly, so there is nothing to download or install. Free, no sign-in, works offline.
Format Document (Shift+Alt+F, Shift+Option+F on macOS), Format Selection and format on save.
The same output as the shfmt 3.14.1 command line tool, byte for byte: 354 of 354 runs on 178 real scripts from GitHub projects and Homebrew, with two option sets. The 19 scripts that shfmt itself rejects get the same error.
Reads the shfmt keys from .editorconfig, so the editor, your team and CI agree.
A syntax error leaves the file unchanged and shows the line and column in the Problems panel.
Same commands check: before a change is applied, the formatted script is parsed again and must run the same commands as the original.
Never touches Dockerfiles, .env files, fish or csh scripts.
A 2 MB script formats in about 0.2 s. Files over 10 MB get a message instead of a frozen editor.
ZOVO PRO AVAILABLEOne-time purchase · No subscription
Add Pro tools to Shell Formatter for Bash & Zsh
Format all shell scripts in a folder. Formats every shell script in a folder and its subfolders with the same engine, settings and .editorconfig as Format Document, or writes a Markdown report.
Formatting check with a patch file. Checks a folder without changing a file and opens one patch of every change formatting would make, with the shfmt command for CI.
Minify a script to a copy. Writes a minified copy of a script next to it (name.min.sh), checked to run the same commands. The original file is not changed.
Format Document (Shift+Alt+F, Shift+Option+F on macOS), Format Selection, format on save, dialect detection, .editorconfig support and the status bar menu, with no sign-in. shfmt 3.14.1 is built in as WebAssembly, so there is nothing to download or install.
What does Zovo Pro add?
Three tools, each with 3 free tries on this computer: Format All Shell Scripts in a Folder, Formatting Check with a Patch File (one unified diff and the shfmt -d command for CI) and Minify a Script to a Copy (writes name.min.sh and keeps the original). A try is used only when the tool gives you a result. Run them from the Command Palette, the status bar menu or the Explorer right-click menu ("Zovo Pro: ..."). Zovo Pro is USD 19 once for every Zovo extension; run "Zovo Pro: Get Zovo Pro" to pay or enter a key.
Is there a file size limit?
Files up to 2 MB format in well under 2 seconds (about 0.2 s on an Apple M-series Mac). Files over 10 MB are not formatted and a message says why (setting shellFormatter.maxFileMB). shfmt runs in a worker thread with a time limit (shellFormatter.timeoutSeconds, default 10); if the limit is hit, the file stays unchanged.
Which files does it skip?
It never touches Dockerfiles, .env files, fish or csh scripts, and a file with binary bytes (NUL), such as a self-extracting installer, is not formatted. A script with a syntax error is left unchanged, and the Problems panel shows the line and column.
Does it send anything over the network?
No. It makes no network requests and has no telemetry, and needs no account. It reads only the open script and the .editorconfig files above it.
Marketplace README snippet (copy link for VS Code Marketplace)
See full docs & install options at [vscode.zovo.one/extensions/zovo-shell-formatter/](https://vscode.zovo.one/extensions/zovo-shell-formatter/), browse all Zovo VS Code extensions at [vscode.zovo.one](https://vscode.zovo.one/), or explore [Zovo Pro](https://vscode.zovo.one/pro/).
Auto rename tag and auto close tag as you type in HTML, JSX/TSX, Vue, Svelte, PHP, Blade, Twig, XML and Markdown. One undo step for both tags, never pairs <br> or TypeScript generics, highlights the matching tag. Free, no sign-in, works offline.
Run C++ and C code with one click: compile and run the current file with gcc, g++, clang or clang++. Interactive input in the terminal, an Input panel with saved test cases and diffs, errors in Problems, Stop for endless loops, per-file flags. Free, no sign-in, works offline. Zovo Pro adds a sanitiz
JavaScript playground and TypeScript scratchpad for VS Code: the value of each line shows at the end of the line as you type, with console.log output and errors on their own lines. A live JS and TS runner for quick tests and a REPL-style scratch file, with no tsconfig, no setup and no sign-in. Free,
Free and offline. CSS class names and id completion in HTML, React, Vue, Svelte, Angular, PHP and Blade, from every CSS, SCSS and Less file in your project, <style> blocks, linked style sheets and CSS modules. Go to definition and hover. Light on CPU in big monorepos.
Free HTML preview and HTML viewer beside your editor. Linked CSS, JS and images load, it updates as you type, and nothing is sent anywhere. No sign-in, no server, works offline. Zovo Pro adds save as one file, an accessibility and SEO check and a folder link check.
XSD viewer for VS Code: open XML Schema (.xsd) files and the schemas in .wsdl files as a tree and a diagram, with imports and includes resolved across the workspace, search and jump to line. Offline, no account.