Skip to main content

Number lines

Number all the lines of a text by choosing the starting number and the separator, then copy the result ready to reuse in a document or a message.

  • Clipboard
Automate

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Starting number

Was this tool useful?

How does this tool work?

Automatically add a number at the start of every line of a text. Customise the first number and the separator to suit the layout you want, then copy the result.

The tool adds a numeric prefix to every line, empty lines included. The sequence starts at 1 by default and uses a full stop followed by a space. You can change the starting number and the separator. Line breaks are normalised, but the text of each line is not rewritten. The starting number can be 0 or negative; if the field is empty or invalid, numbering starts at 1. Remove empty lines before numbering if they should not get a number. Automatic numbering is especially useful when lines need to be referred to in a discussion, a review or a working document. A “1.” prefix suits an ordinary ordered list, while a separator such as “-” or “:” may work better for a technical log. Choose the separator before copying the result, because it becomes part of the text. The sequence is applied line by line, so an empty line also gets a number. That can help to pinpoint an exact position in a document, but it is awkward if you only want to number non-empty items; in that case, remove empty lines first. Spaces and line content are not corrected: a typo or unusual indentation stays after the prefix. To continue the numbering of an existing list, enter the matching starting number. After converting, check the first lines, the last number in the sequence and any blank lines. Keep the unnumbered version if you may reorder the items later. If you are preparing cross-references, avoid changing the order of the lines without regenerating the numbers, or references may point to the wrong items. For a list that changes often, keep an unnumbered version and add numbers only when you share or export it.

How to use this tool

  1. Paste the text

    Put the lines to number in the field.

  2. Set the prefix

    Choose a starting number and the separator you want.

  3. Check the sequence

    Look at how empty lines are numbered, then copy the result.

Use cases

Numbering instructions

Give each instruction a number so it is easy to refer to in a conversation.

Locating items

Number inventory lines so you can cite a specific item.

Preparing a questionnaire

Add a consistent sequence to a list of questions you have already written.

Examples

Numbering two lines

Input

A
B

Result

1. A
2. B

Starting at zero with a bracket

Starting number 0 and separator “) ”: handy for keeping number 0 for an introductory line.

Input

Introduction
Step A
Step B

Result

0) Introduction
1) Step A
2) Step B

Tips and best practices

  • Empty lines get a number too.
  • To continue after an existing list, enter the next number directly, for example 12.
  • The numbers become part of the exported text: if you reorder the lines, renumber them so no outdated references remain.

Frequently asked questions

Can I start at zero?

Yes. Enter 0 as the starting number: the first line gets 0, the next 1, and so on. Negative numbers are accepted too.

Are empty lines numbered?

Yes, every line gets a number, even an empty one.

Can I change the separator?

Yes. The separator is inserted exactly as typed between the number and the text: “. ”, “) ”, “- ” or a pasted tab, for example.

Is the text rewritten?

No, only a prefix is added at the start of each line.

How do I avoid numbering empty lines?

Remove them before numbering, for example with the empty line remover.

Related tools

Tools similar or complementary to this one.

Similar tools

Randomly shuffle the lines of a text or a list in a few seconds.

Text & writingUse this tool

Remove duplicate lines from a list while keeping one occurrence of each value.

Text & writingFeaturedUse this tool

Compare two lists to find the items they share and the ones that differ.

Text & writingUse this tool