Skip to main content

Add Line Numbers to Text — Number or Strip Every Line

Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only

  • Runs locally
  • Category Text
  • Best for Removing repetitive cleanup work from everyday writing and operations.
Paste text and the tool puts a number in front of every line. Set the starting number, the step, and the separator. Right-align the column with zeros or spaces so wide files stay tidy, or skip blank lines so they keep no number. Flip to Remove to strip numbering a list already has. Everything runs in your browser and the share link reopens the exact output.
Mode
Options
Input5 lines
Output5 lines

What this tool does

Free online tool to add line numbers to any block of text. Paste a list, a log, a poem or a chunk of code, and it puts a running number in front of every line: 1, 2, 3, and so on. You control where the count starts, the step between numbers, and the separator that sits between the number and the text (a dot and space, a tab, a pipe, or anything you type). Turn on right-alignment and the column is padded with zeros or spaces to the width of the largest number, so a thousand-line file stays in a clean, even column instead of jittering as the digits grow. Blank lines can keep a number or be skipped so the visible count never breaks. A second mode does the reverse: paste an already-numbered list and it strips the leading "12. ", "007 | " or "3)" prefix off each line and hands the clean text back. Output updates as you type, with a live line count and one-click copy. Everything runs in your browser; nothing is uploaded.

Tool details

Input
Files + Text + Numbers
The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
Output
Live result + Copy
The result area focuses on usable output, with copy, download, or preview actions when supported.
Privacy
Browser-side processing
The main tool logic does not call an external API, so inputs normally stay in the current tab.
Save / share
Shareable URL state
Key settings are encoded in the URL so another person can reopen the same setup.
Performance budget
Initial JS <= 9 KB
No WASM budget is declared, keeping the tool quick to open on mobile.
Best fit
Text · Developer
Category and role tags drive related tools, internal links, and quick fit checks.

How to use

  1. 1. Input

    Paste or drop your content into the tool panel.

  2. 2. Process

    Click the button. All processing is local in your browser.

  3. 3. Copy / Download

    Copy the result or download to disk in one click.

How Add Line Numbers fits into your work

Use it to clean, compare, reshape, or extract plain text before it goes into a document, CMS, spreadsheet, or prompt.

Text jobs

  • Removing repetitive cleanup work from everyday writing and operations.
  • Making text easier to compare, paste, publish, or feed into another tool.
  • Working with content locally when the text is private or unfinished.

Text checks

  • Scan for unintended whitespace, duplicate lines, and lost punctuation.
  • For long text, test the first few lines before applying the whole change.
  • Copy the final output only after checking the preview.

Good next steps

These links move the current task into a more complete workflow.

  1. 1 Text Sorter Sort lines alphabetically, numerically, by length, or reverse — case-sensitive optional — browser-only Open
  2. 2 Find and Replace Text Batch find-and-replace on big text — regex, $1 capture groups, whole-word, case toggle, multiple chained rules — runs entirely in your browser Open
  3. 3 Text Deduplicator Remove duplicate lines from any list — case-sensitive optional, whitespace-trim optional, count duplicates — browser-only Open

Real-world use cases

  • Number a checklist or steps for a doc

    You wrote out fifteen onboarding steps as plain lines and the doc needs them numbered. Paste the lines, the tool numbers them 1 to 15, copy, and drop them back in. Need the list to continue from a section that ended at step 9? Set 'Start at' to 10 and the numbering picks up right where the previous block left off — no manual retyping, no renumbering when you reorder a line and re-run it.

  • Cite specific lines when reviewing code or config

    To point a teammate at a problem you want "line 42 of this snippet", not "somewhere near the middle". Paste the snippet, number every line, and now you and the reviewer share an exact reference. Set the start to the real file's first line number and a tab separator so it reads like an editor gutter. Strip the numbers back off before committing with the Remove mode.

  • Build an ordered list for a spreadsheet or CSV

    You have a column of names or SKUs and need a matching index column. Paste the column, pick a tab or pipe separator so the number and the value land in two cells, copy, and paste into the sheet. Zero-padding keeps IDs like 001, 002, 010 sortable as text, which a plain 1, 2, 10 breaks the moment a spreadsheet sorts lexically.

  • Clean numbers off a list someone already numbered

    A colleague sends a numbered list but you need the raw items — to feed a script, re-sort them, or renumber from scratch. Switch to Remove, paste, and the leading '1. ', '2. ' (or '01)', '007 |') prefixes come off every line at once, leaving clean values. Pair it with the deduplicator or sorter to rework the list however you like.

Common pitfalls

  • Forgetting to set the start when continuing a list. If your previous block ended at item 9 and you leave 'Start at' on 1, the new lines restart from 1 and the two blocks collide. Set the start to the next number first.

  • Expecting zero-padding to align a list whose numbers vary wildly. The pad width is the digit count of the largest number, so a list from 5 to 5000 pads everything to four digits (0005 … 5000). That is correct, but if you only wanted the small numbers padded, trim the input first.

  • Using Remove mode on text where numbers are part of the content. A line like '3 apples' has its '3 ' treated as a prefix only when a separator follows; '3. apples' loses the '3. '. If real data starts with a number-plus-separator, copy it aside before stripping.

Privacy

Adding and removing line numbers is plain JavaScript that runs entirely in your browser tab — the text you paste never leaves the page and is never logged. You can safely number private notes, internal code or unreleased copy. One caveat: the shareable URL encodes your text in the query string, so a "share link" pasted into chat records that text in the recipient server's access log, and very long inputs are dropped from the link (the tool still works on screen). For anything confidential, use the copy button and paste the text rather than sharing the URL.

FAQ

Tool combos

Folks in your role tend to reach for these alongside this tool.

Made by Toolora · 100% client-side · Updated 2026-05-29