Validate Bash Script — Free Online
Validate any Bash script against syntax, safety, portability, and quality rules. Every failing check is line-anchored with a suggested fix.
What validation returns
# validation → risk score + 12 sections + suggested fixes
# Example: `bash -n` says OK, validator finds:
# medium line 12: `set -e` disabled inside function via `|| true`
# high line 20: unsafe `eval` on tainted input
Beyond `bash -n`
`bash -n` only proves parse-ability. Real validation covers what the script will *do* — unquoted expansions that will silently corrupt data, missing pipefail that will silently swallow errors, unsafe input handling that will silently be exploited.
Portability included
If your Bash script needs to work on macOS and Linux, the validator flags Bash-4-only features (mapfile, associative arrays) that break on macOS's default Bash 3.2.
Exports for gate reviews
Markdown, PDF, or JSON export. Use in code review, change management, or a CI validation step.
Frequently asked questions
- What Bash version does the validator target?
- Bash 3.2 through 5.x. It calls out version-specific constructs when a script uses them.
- Does the validator run my script?
- No. Static analysis only.
- Can I trust the validation for security-critical scripts?
- It catches the common classes of bugs. For security-critical code, pair it with a human review and dedicated security tooling.