Calculator

What the Sort Lines does

Sort Lines: calculates Lines and Output from Lines, Order and Ignore case. Example: order Natural (2 before 10), ignore case Yes and remove duplicates No gives lines 9.

Lines and Output, derived from Lines, Order, Ignore case and Remove duplicates. The result recalculates on every keystroke without a button press or a page reload.

It is mostly used by writers cleaning up a draft. Consistent formatting is the difference between a draft and something publishable.

Nothing is uploaded, so you can paste sensitive copy without it leaving your machine.

If you want to check the arithmetic, the field table, the method and a worked example are further down.

What do the Sort Lines fields mean?

The Sort Lines uses 5 inputs. The defaults are there to be replaced. They exist so the tool is never showing an empty result.

FieldWhat to enterDefault
Lines paste or type any amount of text banana apple Cherry apple banana date fig 10 plums 2 plums
Order choose from A to Z, Z to A, Natural (2 before 10), Shortest first, Longest first or Reverse current order Natural (2 before 10)
Ignore case choose from Yes or No Yes
Remove duplicates choose from Yes or No No
Remove blank lines choose from Yes or No Yes

How does the Sort Lines work?

Lines and Output ← f(Lines, Order, Ignore case, Remove duplicates, Remove blank lines)

Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same calculation.

Nothing is computed until the inputs pass their checks, so you will not get a confident answer built on a typo.

Worked example

These are the values the Sort Lines loads by default, and the result it produces from them. These are the tool’s own default values and the result they produce, not an invented illustration.

Inputs
Linesbanana apple Cherry apple banana date fig 10 plums 2…
OrderNatural (2 before 10)
Ignore caseYes
Remove duplicatesNo
Remove blank linesYes
Result
Lines9
Output2 plums 10 plums apple apple banana banana Cherry date fig

How to use it

  1. Paste your content into Lines.
  2. Pick a value for Order: the options are A to Z, Z to A, Natural (2 before 10), Shortest first, Longest first or Reverse current order.
  3. Pick a value for Ignore case: the options are Yes or No.
  4. Pick a value for Remove duplicates: the options are Yes or No.
  5. Pick a value for Remove blank lines: the options are Yes or No.
  6. Live output means you can search for a target value by nudging an input up and down.
  7. The panel reports Lines and Output.
  8. Both Copy Link and Print capture the current state, so pick whichever suits how you file things.

What this tool does not do

  • Word and character definitions vary between tools: this one counts whitespace-separated tokens.
  • Assumptions built into the method are stated above, but they are still assumptions.

Frequently asked questions

Just Lines, Order, Ignore case, Remove duplicates and Remove blank lines. A starting value is in place for each, letting you treat it as a what-if tool rather than a data-entry form.

With the values loaded when the page opens, lines comes out as 9. It recalculates the moment an input changes, which makes comparing scenarios quick.

Not at all: the whole thing runs offline once the page has loaded, which tells you nothing is being sent.

It costs nothing, and there is no limit on repeat use.

The output is deterministic. The same inputs always give the same answer, and the method is documented above so you can check it.

YoursTools Team
Product & Engineering

Builds and maintains every calculator on YoursTools.