Bash Formatter

Your workspaceProcessed on your device

sh-syntax 0.8.7 runs on this device.

A few things to know.

Uses sh-syntax 0.8.7 with the mvdan parser and printer in a browser worker. Supports Bash and POSIX sh scripts up to 125,000 characters. The page parses and formats source as text.

  1. Choose Bash for scripts with Bash syntax such as arrays. Select POSIX sh for a portable shell script.
  2. Paste the complete script or load the example. Pick tabs, two spaces or four spaces and select Format shell.
  3. Inspect the formatted source and any parser error. Copy or download the output as a shell file.