Number a Multi-line String
Add a line number to the start of every line. Runs entirely in your browser, so your data never leaves your device.
Runs on your device, nothing uploaded
0 chars · 0 lines
Output
Add a line number to the start of every line.
Type or paste above to see the result here.
What you paste never leaves this tab
Number a Multi-line String is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, the text you paste is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.
- No upload
- No length limit
- Works offline once loaded
- Nothing stored or logged
How to use Number a Multi-line String
- 1. Paste your lines. Enter the multi-line text you want numbered into the input pane, such as a list of steps, a code snippet or a set of items.
- 2. Choose the starting number and separator. Set Start at to the first number, and tap a separator chip such as 1. or 1) or Tab. Skip empty lines leaves blank lines unnumbered, so a gap does not use up a number.
- 3. Right-align the numbers if needed. Turn on Right-align the numbers so that numbers of different widths, like 9 and 10, line up on the right instead of the left when the list runs into double digits.
- 4. Copy the numbered list. Copy the result from the output pane into documentation, a code review comment, or anywhere a clearly numbered list is needed.
When to use Number a Multi-line String
Number a Multi-line String adds a sequential number to the start of every line, turning a plain list into a numbered one. It's for whenever a set of items pasted in one at a time needs clear ordering for reference or discussion.
- Numbering steps in a how-to guide. You drafted a set of setup instructions as separate lines and want them to read as a proper numbered list before pasting them into documentation.
- Referencing lines in a code review. You're pasting a code snippet into a review comment and want line numbers so a colleague can reference 'line 3' directly instead of describing which line they mean.
- Creating a numbered checklist for a meeting. A list of agenda items typed one per line needs numbering so attendees can refer to 'item 4' during discussion instead of describing it from scratch.
- Formatting a ranked list for a report. A list of findings, ordered by priority, needs numbers starting from 1 to make the ranking explicit when it's pasted into a shared report.
Examples
Number lines
Input
a b c
Output
1. a 2. b 3. c
A to-do list with a gap
Input
Buy milk Call Sam Book flights
Output
1. Buy milk 2. Call Sam 3. Book flights
About the Number a Multi-line String tool
Number a Multi-line String does its work locally, right in the browser. Add a line number to the start of every line. There is no upload step, no queue and no account, and your data never travels over the network.
It belongs to the String Tools collection on EditSafely, a set of 159 small, focused String utilities that share the same instant, private workspace.
You can shape the output with 4 settings, including Start at, Separator, Right-align the numbers and Skip empty lines, and the result refreshes the moment you change one. 2 worked examples further down the page show exactly what the tool produces for real inputs.
Running locally also makes the tool fast and dependable: results appear as soon as your input does, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.
Frequently asked questions
Is Number a Multi-line String free to use?
Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
How much text can I process at once?
There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.
Do I need to sign up or install anything?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.