Number range expander
Number range expander with local processing and strict input validation.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Text
Result
The result was generated locally.
Enter text to process
What this tool does
- Compress a whitespace- or comma-separated integer list into ranges: 1 2 3 5 becomes 1-3, 5.
- The input is sorted ascending and de-duplicated first, so repeated numbers appear only once.
- Only integers (with an optional minus sign) are accepted; decimals, letters or values outside the safe integer range fail with an error.
Example
Input
1 2 3 5
Output
1-3, 5
The example sorts and de-duplicates first, then merges into 1-3, 5; non-integer input fails.
Frequently asked questions
Is empty input supported?
Yes, it returns an empty result.
How is invalid input handled?
It returns an explicit invalid-input error.
Which numbers are merged into ranges?
Consecutive numbers are compressed into a start-to-end range, while isolated numbers remain separate.
Keywords:Number range expanderno-range-parsetext encodinglocal tool