Number Range Expander & Compactor
Expands compact lists like 1,3,5-9 into individual numbers and compacts long lists back into ranges, reporting gaps, duplicates and totals.
Separate with commas, semicolons, spaces or line breaks β mixed is fine. Ranges also accept .. and an en dash.
Result
Where this shows up
Print dialogs, scanners and ticketing systems all speak the compact form 1,3,5-9. Databases and spreadsheets want one value per row. Going from one to the other by hand is where numbers get skipped, and a skipped invoice number is the kind of thing an audit finds before you do.
The gap list is the part worth reading: it takes the smallest and largest values you pasted and reports every number missing in between, already compacted. Paste the invoice numbers you actually issued and the holes in the sequence show up on their own.
Compact ranges and long lists, both directions
The print dialog takes 1,3,5-9. The database wants one value per row to feed a WHERE IN clause. The ticketing system shows the compact range while the checking sheet shows the open list. Translating between the two by hand is where numbers quietly go missing, and a missing invoice number tends to surface in an audit before it surfaces for you. This converts both ways, with matching results.
Expanding turns 5-9 into 5, 6, 7, 8 and 9, and loose numbers pass through untouched. Compacting reads the whole list, sorts it and folds runs back into ranges. The step applies to both sides: with a step of 2, expanding 1-9 gives 1, 3, 5, 7, 9, and compacting that same list returns 1-9. Commas, semicolons, spaces and line breaks can be mixed in the input, and the range marker accepts a hyphen, .. or an en dash.
The part worth reading is the gap list. It takes the smallest and largest value you pasted and reports every number missing in between, already compacted: paste the invoices you actually issued and the holes show up on their own, as 10-11 and 13-19. By default only runs of three or more become a range, since writing 7-8 usually costs more space than it saves; flip the pair option if you want the opposite.
Frequently asked questions
My data uses 5..9 instead of 5-9. Do I have to convert it first?
My document numbers carry leading zeros, like 007. Do they survive?
Is there a cap on how many numbers an expansion can produce?
Related Tools
IPv4 CIDR Range Expander
Expand IPv4 CIDR blocks (e.g. 192.168.0.0/24) into first IP, last IP, broadcast, mask and total usable hosts. Useful for network and firewall planning. Everything in your browser.
Bank Code Lookup
Find FEBRABAN code of major Brazilian banks (BB, ItaΓΊ, Bradesco, Santander, Nubank, Inter, Caixa) by name or number.
Number Picker
Pick random numbers without repetition between a minimum and maximum. Ideal for lotteries, raffles and random selections.