Line Numbering
TextEverything runs locally in your browser — nothing is uploaded
Put a number at the start of every line, or take an existing one away. Stripping is the part that goes wrong. A date like `2026.09` and a time like `3:00` both look like “digits followed by a separator”, so a loose rule cuts them off and the sentence breaks in the middle. This tool therefore reuses the rule already tuned in the text cleaner: digits, then an unambiguous separator, then whitespace. Both tools will always agree on what counts as a line number. Unnumbered blank lines do not consume a number either. If they did, the sequence would visibly skip — which is the one thing someone ticking that option does not want. Padding is skipped for negative numbers. `String(-1).padStart(4, '0')` yields `00-1`, with the minus stranded in the middle. That only happens when the start value is negative, so the sign is checked before padding.
Features
- Six styles: dot, closing parenthesis, parentheses, brackets, ideographic comma and colon
- Adjustable start and step (a negative step numbers backwards)
- Optional zero padding, skipped for negative numbers so `00-1` never appears
- Blank lines can be left unnumbered and uncounted, so the sequence never skips
- Stripping recognises the same six styles, including the form without a trailing space
- Dates and times are never mistaken for numbering
- Adding and stripping share one rule, so a round trip returns the original
- Everything runs locally in your browser; nothing is uploaded
How to use
- Paste the text you want to number
- Choose Add numbers or Strip line numbers
- When adding, pick a style and adjust the start, step and padding if you need to
- Click Copy to take the result
FAQ
- Will stripping also eat numbers inside the text?
- No. The rule requires digits followed by an unambiguous separator (a dot, a bracket, a colon and so on) and whitespace after that separator. In `2026.09 published`, the `2026.` is followed by a digit rather than whitespace, so it is left alone; the same goes for `3:00`. The only relaxation is the ideographic comma form, which is unambiguous without a space.
- I left blank lines unnumbered but the sequence still skips. Why?
- A number can only skip for two reasons: the option is not in effect (check that the dropdown is not still on Strip), or the “blank” lines actually contain spaces or tabs. A line holding only spaces is not an empty string, so it is numbered like any other. Clean the line endings first with the text cleaner, then number.
- Why are negative numbers not zero-padded?
- Because `String(-1).padStart(4, '0')` gives `00-1` — the minus sign ends up in the middle of the digits. Padding is therefore applied to non-negative numbers only and negatives are written as they are. For a countdown such as `-3 -2 -1`, padding would not mean much anyway.
Related tools
Text Cleaner
TextClean up a column pasted out of a log or spreadsheet: deduplicate, sort, drop blank lines, trim whitespace and strip line numbers, all in your browser.
Merge Lines
TextMerge multiple lines into one: turn line breaks into a space, a comma, a semicolon or nothing, with blank lines handled first.
Column Extract
TextTake chosen columns out of every line: split by a delimiter or slice by character position, with 2-4 ranges and negative indexes.
Text Diff
TextCompare two blocks of text online and highlight added, removed and unchanged lines, so only the lines that changed are marked. Runs in your browser.
Word Counter
TextCount Chinese characters and English words separately, alongside characters, lines, real UTF-8 bytes, reading and speaking time, and SMS segment counts.
Case Converter
TextConvert identifiers between fourteen naming styles. Words are split correctly first, so acronyms such as HTTPServer come out right, all in your browser.