Add Line Numbers to Text or Code
Number every line of your text or code, with custom start, separator, padding and empty-line skip.
- Runs on your device
- Free, no account
- Works offline
Tool Cloud apps for this kind of work.
// Overview //
About Add Line Numbers to Text or Code
This tool adds line numbers to plain text or source code directly in your browser. Paste your content or load a file, set where numbering starts, choose the separator between the number and the line, and pad numbers to a fixed width. It is useful for writers, editors, developers, teachers, and anyone who needs numbered lines for reference, review, or citation.
The tool runs entirely in your browser, so your text and files never leave your device, and it keeps working after the page has loaded, even offline. There is no upload step, no account, and no usage limits. Results can be copied or downloaded immediately.
// Getting started //
How it works
-
Step 1

Paste or load text
Paste your text into the input box or select a local file from your device.
-
Step 2

Set numbering options
Choose the starting number, the separator after each number, number padding, and whether empty lines stay unnumbered.
-
Step 3

Copy or download
Copy the numbered text to your clipboard or download it as a file.
// Capabilities //
Built for the details
Custom start number
Begin numbering at any number you choose, not just one.
Separator and padding
Control what appears between the number and each line, and pad numbers to a fixed width so lists stay aligned.
Skip empty lines
Optionally leave blank lines unnumbered so paragraphs and code structure stay readable.
Runs in your browser
All processing happens locally on your device, with no uploads, accounts, or usage limits.
// Use cases //
Where this tool fits
Code review references
Number lines of source code so teammates can point to exact lines in review comments or bug reports.
Proofreading and editing
Number lines in a draft so editors and proofreaders can flag issues at a precise location.
Legal documents
Number each line of a contract or statement so specific lines can be cited in discussion or review.
Classroom materials
Add numbers to poems, passages, or exercise sheets so students can reference specific lines in class.
// Good to know //
Frequently asked questions
Where is my text processed?
Entirely in your browser. Your text and files never leave your device, and the tool keeps working after the page has loaded, even without an internet connection.
Is the tool free to use?
Yes. It is free and unlimited, and you do not need an account.
Can numbering start at a number other than one?
Yes. You can set any starting number, for example 0 or 100, and the tool counts from there.
Can blank lines be left unnumbered?
Yes. Enable the skip empty lines option and blank lines are kept in the output without receiving a number.
Can I number a file instead of pasted text?
Yes. Pick a local file in the page instead of pasting, then copy the numbered result or download it.
A simpler way to get work done
Immediate results. Work directly on your device, with no upload or processing queue.
- Free to use — No credits or account required. Use the tool whenever you need it.
- Ready when you are — Once loaded, the tool keeps working without an internet connection.
- Your files stay on your device
// Keep going //
Related tools
Other tools people use alongside Add Line Numbers to Text.