InputTestHub

Add Line Numbers

Adds a number to the start of every line, with a configurable start value, step, padding and separator.

Text Nothing uploaded No sign-up Free, unlimited
Text tool
Paste something on the left to see the result.
In short Adding line numbers puts a number at the start of every line, with a configurable start value, step, zero-padding and separator. Padding is the option people skip and then need: without it, line 9 and line 10 have different widths and nothing aligns, so a numbered list of a hundred lines looks ragged. Padding to a fixed width fixes it in one setting. The start value matters when you are numbering part of something — a code excerpt that begins at line 240 of a file should be numbered from 240, not from 1, or every reference you make to it is wrong. The step exists for the same reason: numbering by tens or by twos matches the conventions used in scripts, legal documents and verse. Two things to decide before you run it. Whether blank lines get numbers changes the count and is genuinely a preference. And the numbers become part of the text, so anything you do afterwards — sorting, searching, pasting into code — sees them. Number last, not first.

How to use the Add Line Numbers

  1. Paste your text into the input box on the left.
  2. Adjust the options above the box if you need a different behaviour.
  3. The converted text appears on the right; press Copy to put it on your clipboard.

About the Add Line Numbers

The Add Line Numbers adds a number to the start of every line, with a configurable start value, step, padding and separator. It runs as plain JavaScript inside the page, which means there is no upload step, no queue and no size limit imposed by a server — the only limit is your own device.

What people use it for

  • Numbering a list of steps or references.
  • Creating a numbered checklist from plain lines.
  • Adding line references before sharing a code snippet.

Frequently asked questions

Is the Add Line Numbers free?
Free, unlimited, and no email address required. You can use it a hundred times a day and nothing changes.
Is what I paste into the Add Line Numbers stored?
No. The Add Line Numbers runs entirely in your browser using JavaScript. Because the work happens locally, the tool also keeps working if your connection drops, and closing the tab is all it takes to discard everything.
Who is the Add Line Numbers for?
The jobs it is built for: numbering a list of steps or references. Creating a numbered checklist from plain lines. Adding line references before sharing a code snippet. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
Can I use the Add Line Numbers on mobile?
Yes. The page is responsive and the tool works in Chrome, Safari, Firefox, Edge and Samsung Internet on both Android and iOS. There is no app to install and nothing to sign into.

Related text tools

All 92
01

Case Converter

Converts text between twelve cases: UPPER, lower, Title, Sentence, camelCase, PascalCase…

02

Uppercase Converter

Converts any text to UPPERCASE instantly, keeping numbers, punctuation and line breaks exactly…

03

Lowercase Converter

Converts any text to lowercase, including text that was typed with Caps Lock on by mistake.

04

Title Case Converter

Converts headings to proper Title Case using AP and Chicago rules, keeping short words like…

05

Sentence Case Converter

Rewrites text in sentence case: first letter of each sentence capitalised, the rest lowercase…

06

camelCase Converter

Turns any phrase into camelCase for JavaScript, Java and JSON keys, stripping spaces, hyphens…

07

PascalCase Converter

Converts phrases to PascalCase (UpperCamelCase) for class names, React components and type…

08

snake_case Converter

Converts text to snake_case for Python variables, database columns and file names.

09

kebab-case Converter

Converts text to kebab-case for URLs, CSS class names and HTML attributes.

10

CONSTANT_CASE Converter

Converts text to SCREAMING_SNAKE_CASE for environment variables, constants and configuration…