Shell Brace Expansion Expander
Bash brace expansion is one of the most useful shell features and one of the easiest to get wrong. file.{txt,md} expands to two filenames; img-{01..10}.png generates 10 zero-padded filenames; {a,b}{1,2} generates the cartesian product. This tool expands any brace expression so you can verify it before running anything dangerous like rm or mv.
How to use the Shell Brace Expansion Expander
Type a brace expression. Supported syntax: comma lists {a,b,c}, numeric ranges {1..10} with optional zero-padding {01..10} and step {1..20..2}, letter ranges {a..f}, and nesting / chaining for cartesian products.
Previewing bash brace expansion safely
Brace expansion is one of bash’s most useful features and one of the easiest to misjudge. file.{txt,md} becomes two names, img-{01..10}.png generates ten zero-padded names, and {a,b}{1,2} produces a cartesian product. Get it wrong in front of rm or mv and you delete or move the wrong files.
This expands any brace expression so you can see the full list before running a command. It supports comma lists, numeric ranges with optional zero-padding and a step, letter ranges, and nesting for cartesian products. The expanded output is plain lines you can then order or clean with sort lines and deduplicate lines.
Common use cases
- Verifying before rm/mv — expand a pattern to see exactly which names it produces.
- Generating filenames — produce a numbered or zero-padded sequence of names.
- Building URL lists — expand
{a,b,c}segments into full URLs. - Cartesian products — combine environments and regions into every pairing.
- Learning the syntax — see how ranges, steps, and nesting expand.
Frequently asked questions
What syntax is supported?
{a,b,c}, numeric ranges {1..10} with optional zero-padding {01..10} and step {1..20..2}, letter ranges {a..f}, and nesting for cartesian products.Why preview an expansion?
rm or mv.Does {01..10} keep the leading zeros?
Can I combine multiple braces?
{a,b}{1,2} yields four results.