Numbered lines with full control over the layout
Each line is prefixed with a counter that starts at Start at (default 1; 0 is allowed because the registry sets min: 0). The default separator between the number and the line is . (period plus space), set via Suffix. Change Suffix to ) , : , \t, or anything else you need.
Skip Empty leaves blank lines unnumbered and does not advance the counter on them. So in line A / blank / line B with the toggle on, line A is 1 and line B is 2; the blank line stays blank. With the toggle off the blank line gets numbered too.
Format overrides Suffix when populated. It is a template containing %n, which is replaced by the current number. Examples: [%n] produces [1] line, %n) produces 1) line, L%n: produces L1: line. Leave Format empty to fall back to the suffix-based layout.
How to use number every line
- 1Paste or type your text into the input panel on the left.
- 2Set Start at to the number you want the first line to use (default
1). - 3Adjust Suffix if you want a different separator between the number and the line text.
- 4Toggle Skip Empty on to leave blank lines bare and unnumbered.
- 5Optionally type a Format pattern with
%nto override the default layout.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Counter starts at any non-negative integer
Start at defaults to 1. The registry allows min: 0, so a literal 0 is honoured (you can start with 0. line if you prefer zero-based numbering).
Skip Empty stops the counter on blanks
When the toggle is on, lines whose trim() is empty are passed through unchanged and the counter does not advance for them. Numbered lines stay densely sequential.
Custom Suffix between number and line
The suffix sits between the number and the line content. The default is . ; common alternatives are ) , : , or a tab. The suffix is inserted verbatim, no trimming.
Format overrides the default layout
When Format is non-empty, the tool runs format.replace(/%n/g, num) and prepends the result to the line. Use [%n] , %n) , L%n: , or any pattern with one or more %n placeholders.
Line endings are normalised on output
The split uses \r?\n and the join uses \n, so CRLF input becomes LF output. The numbering and content are preserved verbatim.
Worked example
Format [%n] , Skip Empty on. The blank line stays blank, the counter advances only on non-blank lines.
alpha bravo delta
[1] alpha [2] bravo [3] delta
Settings reference
| Behaviour | Effect on output |
|---|---|
| Start at | First counter value. Default 1. 0 is permitted. |
| Suffix | String inserted between the number and the line content. Default . . |
| Skip Empty off | Every line gets a number, including blank ones. |
| Skip Empty on | Lines whose trim() is empty are passed through; counter does not advance. |
| Format empty | Falls back to number + suffix + line. |
Format with %n |
Layout is format.replace(/%n/g, number) + line. Suffix is ignored. |
| Line endings | CRLF input becomes LF output. Numbers are preserved verbatim. |
FAQ
Can I start the count at zero?
0. The first line will be numbered 0.How do I get brackets around the numbers?
[%n] . The placeholder %n is replaced by the current number for each line.What does Skip Empty do to the counter?
How do I remove the line numbers later?
^\d+\.\s* and flags gm to strip leading numbers from each line.