Run tool
The Add Line Numbers tool lets you quickly number lines of text. Paste or type your content into the text area, then choose your starting number, separator, and formatting options. By default, numbering starts at 1, uses a period and space as the separator, and pads numbers with leading zeros so they align neatly. You can turn off zero-padding for a cleaner look, or enable the Skip Empty option to leave blank lines unnumbered while still numbering the rest. The tool works with plain text divided by newline characters, so each line gets its own number. After you click Run, the result panel shows your text with the line numbers added. This is useful for code snippets, lists, drafts, or any content where you need to reference specific lines. The tool is free to use online.
Instructions
- Enter or paste your text into the Text field. Each line you want numbered should be on its own line.
- Set the Start number. The default is 1, but you can start from any number, including 0.
- Choose a Separator. The default is a period followed by a space, but you can use a colon, tab, or any other character.
- Decide if you want Zero Pad enabled. When on, numbers are padded with leading zeros to match the width of the highest number.
- Optionally turn on Skip Empty. This leaves blank or whitespace-only lines unchanged and does not assign them a number.
- Click Run to generate the numbered output.
Examples
- Input: "apple\nbanana\ncherry" with Start=1, Separator=". ", Zero Pad=on, Skip Empty=off. Output: "01. apple\n02. banana\n03. cherry".
- Input: "line one\n\nline three" with Start=10, Separator=": ", Zero Pad=off, Skip Empty=on. Output: "10: line one\n\n11: line three".
FAQ
What happens if I leave the text field empty?
If the text field is empty, the tool returns an empty result with no lines.
Can I start numbering from a number other than 1?
Yes. The Start field lets you enter any whole number, including 0. The minimum allowed is 0.
What does Zero Pad do?
When enabled, numbers are padded with leading zeros so that all numbers have the same width. For example, with 100 lines, line 1 becomes "001".
How does Skip Empty work?
When enabled, empty lines or lines that contain only whitespace are left as blank lines without a number. The numbering sequence continues on the next non-empty line, so the count skips the empty lines.
Does the tool handle tabs or spaces in the separator?
Yes. You can use any character or string as the separator, including a tab, a space, or a custom symbol.