Skip to content
OddsockLocal
Local
Source text

Formatting

5 wordsRuns in this browser. Nothing is uploaded.

How to use

  1. Paste the text.
  2. Leave Action on add to prefix numbers, or switch to strip to remove them.
  3. Set the first line number when the count should not begin at 1.
  4. Copy. Strip only removes a leading number of the form it added, plus a closing parenthesis variant.

What is Line numbers?

Line numbers in a paste are either missing or in the way. Add, which is what this page opens on, prefixes each line with its number, a period, and a space. “Odd socks in the dryer.” becomes “1. Odd socks in the dryer.” Two lines, “x” and “y”, become “1. x” and “2. y”. The first line number opens at 1. Set it to 3 and the same two lines are “3. x” and “4. y”. The format is that period and space. There is no custom pattern such as a bracket or a colon.

Read more

Strip removes a leading run of spaces or tabs, a number, an optional “.” or “)”, and the following whitespace. “1. Odd socks” and “2. in the dryer.” go back to the two lines without numbers. A line that does not start that way is left alone. The number in “row10” stays, because it is not a prefix in that shape.

Add then strip is a round trip when every line got the “N. ” prefix and nothing else looked like one. A line that already began with “1. ” will gain another number if you add again. Strip first if the paste is already numbered.

Use cases

  • A teacher numbering a one-line example before a worksheet.
  • A developer stripping “1. ” prefixes from a copied stack trace.
  • A writer starting a list at 3 because lines 1 and 2 live in another file.
  • A reviewer checking that the prefix is “1. ” and not a custom template.
  • A student removing numbers without deleting the “10” inside row10.

A one-line sentence, numbered from 1

Odd socks in the dryer. Action add, first line number 1.

1. Odd socks in the dryer. The prefix is the number, a period, and a space. The sentence is unchanged after that.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

“1. Odd socks in the dryer.” The prefix is the number, a period, and a space.