Help
  • Works with Bash, Sh, Zsh and Ksh scripts
  • Formatting re-indents control structures such as if/for/while/case and functions
  • Pick the indent width in the top-left corner; click Sample to see the result

Shell Formatter and Minifier

Format and minify Shell/Bash scripts online. Control structures are indented automatically, so scripts are much easier to read and debug.

All tools on this site run entirely in your browser locally. No data is uploaded to any server.

Features:

  • Format Shell: Beautify scripts and re-indent if/for/while/case/function blocks
  • Minify Shell: Strip comments and blank lines to reduce file size
  • Indent width: Choose 2 or 4 spaces to match your team's coding style
  • Local files: Load a local .sh file straight into the editor
  • Real-time processing: Scripts are formatted as you type, or run it manually with one click
  • Export results: Copy the result or save it as a file in one click

Common uses:

  • Formatting Shell scripts for easier reading and code review
  • Tidying up messy scripts copied from the web or a blog post
  • Shrinking scripts by dropping comments and blank lines
  • Checking the structure of a script and tracing nested blocks