Home Text Tools Encoding Hashing Generators Developer Converters Text Styles Image Tools

Add Line Numbers Privacy: All processing runs locally

Add line numbers to each line of your text. Customize the starting number, separator, padding, and empty line handling.

Settings
Input 0
Output 0

How It Works

The Add Line Numbers tool prepends a sequential number to each line in your text. It is useful for referencing specific lines in documents, code snippets, instructions, or any ordered list of items.

You can configure the tool with several options:

  • Start number — set the first line number. Default is 1, but you can start from 0 or any other number.
  • Separator — choose what appears between the number and the line content. Options include a dot, parenthesis, colon, tab, or single space.
  • Zero-padding — when enabled, numbers are padded with leading zeros to match the width of the largest number. For example, with 100 lines, line 1 becomes "001". This keeps the text neatly aligned.
  • Skip empty lines — when enabled, empty lines are left as-is without a number, and the counter does not increment for them. This is helpful when your text contains blank lines used as separators between sections.

The tool processes text in real time as you type or paste. All conversions happen locally in your browser, and no data is transmitted to any server. The output can be copied to the clipboard or downloaded as a text file.