Bash Brace Expansion
WebEverything runs locally in your browser — nothing is uploaded
Paste one or more brace patterns and get every expansion at once. It follows bash semantics: `{a}` and `{a,b}` differ — the first is not expanded (it stays `{a}`), while the second becomes `a b`; and `{1..1}` expands to a single item `1`. Ranges support a step (`{1..10..2}`), reverse order (`{10..1}`), zero padding (`{01..03}`) and letters (`{a..e}`), and lists nest freely (`{a,b}{1,2}`). An escaped `\{` and an unclosed `{` are treated as ordinary characters rather than errors. Expansion only builds strings — it does not check whether files exist, exactly like `echo` in bash — and it all runs locally in your browser, with nothing uploaded.
Features
- Comma lists: `{a,b,c}` expands to three items, prefix and suffix kept
- Numeric ranges with a step: `{1..10..2}` gives 1 3 5 7 9
- Reverse order follows the endpoints: `{10..1}` needs no negative step
- Zero padding: `{01..03}` gives 01 02 03, padded to the wider endpoint
- Letter ranges: `{a..e}` and `{z..v}`, with steps and reverse order too
- Nesting and cartesian products: `{a,{b,c}}`, `{a,b}{1,2}`
- A single-element `{a}` is left as is; `{1..1}` expands to one item
- Escaped `\{` and an unclosed `{` are kept as plain characters
- A per-line maximum, so a runaway pattern errors instead of freezing the browser
- One block per pattern, each item copyable on its own or all at once
How to use
- Paste one pattern per line, e.g. `file{1..3}.txt`
- Every item is listed at once, with the expansion count
- Lower the maximum expansions if a pattern is too large
- Use the row copy button for one item, or Copy all for the whole list
FAQ
- Why is `{a}` not expanded to `a`?
- That is bash semantics: a brace with neither a comma nor a valid range is kept literally, so `{a}` stays `{a}` and `file{a}.txt` stays `file{a}.txt`. If you want `filea.txt`, just write it. The one that does expand is the range `{1..1}`, which gives a single item `1` — the pair is easy to mix up.
- Does `{1..03}` pad with zeros?
- Yes. If either endpoint has a leading zero, every item is zero-padded to the width of the wider endpoint, so `{1..03}` gives `01 02 03`, not `1 2 03`. With no leading zero on either side (`{1..3}`) there is no padding.
- Do the expanded file names actually exist?
- They are not checked. Brace expansion only builds strings; it never touches the filesystem or the network. Just like `echo file{1..3}.txt` in bash, it prints three names even when none of the files exists.
- Why is there a maximum expansion count?
- Because `{1..1000000000}` would enumerate gigabytes of text and freeze the browser. The tool counts first (ranges are computed arithmetically, not enumerated) and errors once the limit is passed. The default is 1000 and can be raised.
Related tools
Regex Explainer
WebBreak a regular expression into its parts — classes, quantifiers, groups, assertions, anchors, backreferences and flags — and say what each matches.
Path Converter
WebGet the Windows, forward-slash, WSL (/mnt/c) and Git Bash (/c) forms of a path at once, with the trailing slash kept exactly. All in your browser.
Config Validator
WebCheck a package.json, .env, robots.txt, sitemap.xml or HTTP headers. Findings come in three levels — errors, warnings, suggestions — each with a reason.
URL Parser
WebParse a URL into scheme, host, port, path, query parameters and fragment, with each parameter shown raw and decoded. Runs entirely in your browser.
User-Agent Parser
WebParse a user agent into browser, version, OS, device type and engine, and see which rules matched. Pattern matching only. Runs entirely in your browser.
HTTP Status Codes
WebLook up an HTTP status code for its meaning, 1xx–5xx class, typical uses and common traps. Runs entirely in your browser.