Number Lines
Add line numbers to any text instantly. Choose the numbering format (1., 2), 3:), set the starting number and step, and optionally pad with leading zeros. Perfect for code, lists, documentation, and more. No signup, no uploads — everything happens in your browser.
Why use this Number Lines tool?
Adding line numbers manually is tedious, especially for long lists or code snippets. This tool automates the process, giving you complete control over the numbering style, starting point, step, and padding. It's perfect for preparing documentation, sharing code snippets, or creating ordered lists.
- Multiple formats – choose from dot, parenthesis, colon, space, hyphen, or a custom suffix.
- Flexible numbering – set the start number and step increment to any positive integer.
- Zero padding – pad numbers with leading zeros (e.g., 01, 02, 03) for alignment.
- Instant preview – output updates as you type or when you click Number.
- 100% private – all processing is done locally; your text never leaves your device.
How to number lines (step‑by‑step)
1. Paste your lines
Drop the text you want to number into the left box. Each line will become a numbered item.
2. Choose numbering style
Select the delimiter after the number. For example, "1." gives a dot, "1)" gives a parenthesis, etc. You can also type a custom suffix.
3. Set start and step
Pick the number to start from (usually 1) and the increment between lines (usually 1). Use step 2 to number only even lines, etc.
4. Copy or download
The numbered output appears on the right. Use the buttons to copy to clipboard or save as a .txt file.
Example: numbering a list
| Input | Numbered with "1." style, start 1, step 1, zero padded |
|---|---|
| Apple Banana Cherry | 01. Apple 02. Banana 03. Cherry |
Common use cases
- Code snippets: Add line numbers to code for documentation or debugging.
- Task lists: Create numbered to‑do lists or ordered instructions.
- Data preparation: Assign sequential IDs to rows before importing into a database.
- Reference lists: Number footnotes, bibliography items, or glossary terms.
Pro tips
- If you need to restart numbering after a break, you can process sections separately and then combine them.
- To number only non‑empty lines, first use our Remove Empty Lines tool, then come here.
- The padding option always pads to the width of the largest number. For example, if you have 100 lines, all numbers will have 3 digits (001, 002, …).