Adding a sequential number to each line of text means prefixing every line — including blank and whitespace-only lines — with an integer that increases by one for every logical line in the input. The Add Line Numbers to Text tool does exactly that: paste your text, pick a starting number, choose a separator, optionally turn on zero padding, and the tool returns a numbered version where every original line keeps its exact content and position. The transformation runs entirely in the browser, so your text never leaves your device, and the resulting preview and downloadable file both use a single line-feed character between lines regardless of whether the source used Windows CRLF, classic Mac CR, or Unix LF line endings. This makes the tool a reliable way to assign stable identifiers to scripts, transcripts, support logs, classroom handouts, working copies of legal drafts, and — the case many readers arrive with — text that already contains phone numbers, such as contact lists, dial sheets, and call-back queues where each entry needs a stable reference number for follow-up.

What "adding a number to each line" actually means
Line numbering is the process of prepending an integer to every line of a block of text so each line can be referenced, cited, or compared by its position. The first line gets the starting number, the second line gets starting number plus one, and so on. Blank lines are still counted, so a three-line input that contains content on lines one and three with a blank line between them produces three numbered output lines, in that order. This positional fidelity is the point: a reference to "line 47" in a transcript or "item 12" on a contact sheet must point to the same content no matter who regenerates the file or on which operating system.
People search for "how to add phone number to text" in two related situations. The first is composing or editing a document that should contain a phone number — a signature, a footer, a directory entry, or an SMS draft. That is a writing task, and a word processor, contacts app, or the native messaging app is the right tool. The second situation is the one this article solves: you already have text, and each line of it needs a numeric prefix so the lines can be referenced, sorted, or audited. A contact list that reads "Alice — 555-0142", "Bob — 555-0188", and "Carol — 555-0210" becomes far easier to discuss in a meeting when each entry is prefixed with 1, 2, 3. That second case is exactly what Add Line Numbers to Text is built for, and the same workflow applies to any line-based text — transcripts, logs, code-review notes, or poetry drafts.
Inputs, limits, and output format
The tool accepts up to 1,000,000 characters of input. The starting number must be a whole non-negative integer with at most six digits, so any value from 0 to 999999 is valid. The separator is the literal string inserted between each generated number and the original line text; it can be empty, can contain spaces, punctuation, or a tab character pasted from your clipboard, and is capped at 20 Unicode characters. Leading-zero padding is optional and is computed automatically from the width of the last number in the result: if the final value is two digits, every number in the sequence is padded to two digits.
| Option | Accepted values | Effect on output |
|---|---|---|
| Input length | Up to 1,000,000 characters | Anything beyond this is rejected with a visible error before any output is produced |
| Starting number | Whole integer, 0 to 999999 | First line is numbered with this value; each subsequent line adds one |
| Separator | Literal string, up to 20 Unicode characters | Inserted exactly once between the number and the original line content |
| Leading-zero padding | On or off | Pads every number to the digit width of the final value when on; natural width when off |
| Line endings in output | Always LF | CRLF, CR, and LF in the input are all recognized and normalized to LF |
| Output encoding | UTF-8 plain text, no byte-order mark | Suitable for import into editors, spreadsheets, and downstream scripts |
Empty input, an invalid starting number, or a separator longer than 20 characters produces a visible error instead of a result, so the preview and download controls only become available when the configuration is valid.
How to number every line of your text
- Open Add Line Numbers to Text and paste or type the lines you want to number into the input area.
- Set the starting number to the integer your sequence should begin with — 1 for a conventional list, 0 for a zero-indexed reference, or any value up to 999999 for continuing an existing numbering scheme.
- Type or paste a separator in the separator field. Common choices are a period followed by a space, a colon, a vertical bar, a tab character, or an empty string for no separator.
- Toggle leading-zero padding on or off depending on whether you want all numbers aligned to the width of the final value in the sequence.
- Click the action button to generate the result, then read the preview to confirm that every line — including blanks — received the expected number and that no original content was altered apart from the prepended prefix.
- Download the result as a UTF-8 plain-text file when you are ready to use it. The file contains no byte-order mark and uses LF line endings regardless of the input's line endings.
Editing any option after a result has been generated clears the old output and revokes its object URL, so the download control can never serve a stale preview that no longer matches your current settings.
Numbering a phone-number contact list
When the text you want to number is a contact list, a dial sheet, or a call-back queue that already contains phone numbers, the workflow is the same as for any other text, but a few choices make the output easier to use. Start the numbering at 1 so the first contact is item 1. Use a separator of a period followed by a space so each numbered line reads naturally as "1. Alice — 555-0142". Turn leading-zero padding on if the list has more than nine entries, so the first contact reads "01." instead of "1.", keeping the digits aligned in a printed sheet or a pasted chat message. Paste the list straight from wherever it lives — a CRM export, a notes app, a spreadsheet column, or a plain text file — and the tool will normalize any mixture of Windows, Mac, and Unix line endings before numbering.
If you only need to pull the phone-shaped numbers out of a larger document without numbering the surrounding lines, the phone-number extraction workflow is a better fit, because it returns deduplicated candidates rather than a transformed copy of the source. For numbering, the prefix is generated locally and the original contact information on each line is preserved verbatim — no trimming, no whitespace collapsing, and no interpretation of the digits as anything other than characters.
Choosing a separator and turning on zero padding
The separator is inserted literally, exactly once, between the generated number and the original line text. Because it is a literal string and not a regular expression, characters such as a vertical bar, a colon, and a period followed by a space are inserted as typed, with no escaping or interpretation. A tab character pasted from your clipboard is preserved. An empty separator produces output like "1Alice — 555-0142", which is rarely what you want, but is allowed when you need the tightest possible prefix for downstream parsing.
Leading-zero padding uses the width of the last number in the result. Starting at 8 with three lines produces "08", "09", and "10"; starting at 1 with nine lines produces ordinary one-digit numbers because the final value stays a single digit. Turning padding off renders each number at its natural width. Padding affects only the generated numeric prefix; the original line text is never modified by padding, trimming, or whitespace collapsing. The starting-number limit of six digits applies only to user input validation — the sequence itself can grow past six digits if the input has more than a million lines past the starting point, and those later values are rendered without truncation.
What the tool deliberately leaves alone
The tool does not trim line content, collapse repeated spaces, reinterpret tabs, or skip whitespace-only lines. Every logical line receives a number, and the original characters on each line come through verbatim apart from the prepended prefix and separator. The input area itself is not modified when a result is generated, so your source text stays in place for further edits. The tool also does not renumber an existing numbered list intelligently, count only non-empty lines, preserve the original byte sequence of mixed newline characters, or add page numbers. For a count rather than a transformed copy, use Line Counter; to wrap arbitrary text around each line instead of a sequential number, use Add Prefix and Suffix to Lines.
The download is a plain UTF-8 text file with no byte-order mark, no rich formatting, and no spreadsheet or document structure, produced through the standard Blob mechanism and the consistent line-splitting rules documented for String.prototype.split in the browser. Because the file is plain text, it can be opened in any editor, imported into a spreadsheet by splitting on the separator, pasted into a chat, or fed into a script without further preprocessing.
For a deeper look, see Add Quotes to Each Line Online with Correct Escaping.