Add Line Numbers to Text
Paste text and each line gets a number in front. Choose the starting number, the separator and whether blank lines are counted. You can also remove numbers that are already there.
Deze inhoud is in het Engels.
Uitgewerkte voorbeelden
Three lines
alpha beta gamma
1. alpha 2. beta 3. gamma
Each line gets a number and a full stop.
Start at 9 with colons
a b
9: a 10: b
The numbers are lined up because 10 has two digits.
Over Add Line Numbers to Text
This tool puts a number at the start of every line of your text. Paste your text, choose the first number and the separator, and each line is numbered. The separator can be a full stop, a colon, a vertical bar, a closing bracket, a tab or just a space, so the result can look like a numbered list, a code listing or a tab separated column.
Numbers can be lined up, so short numbers are padded with spaces and the text starts in the same column on every line, even when the list runs past 9 or 99. Blank lines can be left out of the count: they stay in place but get no number, and the count carries on with the next line of text. You can start from any whole number, including 0, which suits code listings and arrays.
The tool also works in reverse. Switch to Remove line numbers and a number at the start of a line is taken off, whichever of the separators was used, along with the separator itself. Lines that do not start with a number are left alone. Windows style line endings are tidied to ordinary line breaks as the text is processed.
Zo gebruikt u Add Line Numbers to Text
- Paste your text, or open a text file.
- Choose the starting number and the separator, then tick the options for lining up and skipping blank lines.
- Check how many lines were numbered in the message.
- Copy the numbered text, or switch to Remove line numbers to strip numbers that are already there.
Veelvoorkomend gebruik
- Referring to lines in a poem, a contract, a script or a set of terms by number
- Adding numbers to a list of items so they can be discussed in a meeting
- Numbering lines of code or configuration for a handout, a tutorial or a bug report
- Making a tab separated numbered column that pastes into a spreadsheet
- Removing numbers from text copied out of a PDF, a book scan or a code listing
- Numbering the lines of a transcript or lyrics so corrections can point to a line
Veelgestelde vragen
Can I start from a number other than 1?
Yes. Set Start at to any whole number, including 0. If the box is empty or not a number, counting starts at 1.
What does Line up the numbers do?
It adds spaces in front of short numbers so that every line of text starts in the same column.
Can I skip blank lines?
Tick Do not number blank lines. They stay in place but get no number, and the count carries on with the next line of text.
How are numbers removed?
A number at the start of a line, followed by a dot, bracket, colon, bar, tab or space, is taken off along with that separator. Lines without a number are left alone.
Could removal take off a number that belongs to the text?
Yes. A line that genuinely starts with a number and a space, such as a year, loses it, so check the result if your text contains lines like that.