Skip to content
Jellykit

Shell Escape

Quote a string so it's passed as one safe argument in bash, zsh or PowerShell. Handles spaces, quotes, $ and ! correctly. Escape a list line by line. Free.

Runs in your browser. Nothing is uploaded.

About Shell Escape

Filenames and values with spaces, quotes, $ or ! break shell commands or, worse, run something you didn't intend. Shell Escape wraps the text so the shell sees exactly one literal argument. In bash single quotes nothing is special except the quote itself, which becomes '\''.

Quote only when needed leaves simple words untouched, and line-by-line mode escapes a whole list of filenames at once, ready for a script.

How to use Shell Escape

  1. Type or paste your text into the input box. Press Sample to see an example.
  2. Adjust the options. The result updates as you type.
  3. Copy the result, or press Use as input to chain another transformation.

Frequently asked questions

Why does it'\''s look so strange?

Bash can't escape a quote inside single quotes, so the string is closed, an escaped quote is added, and the string is reopened.

Does PowerShell work the same way?

No. In PowerShell single-quoted strings, a quote is escaped by doubling it, and that's what the PowerShell style does.

Is Shell Escape free and private?

Yes. Shell Escape is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all developer tools →