Add Line Numbers
Add sequential numbers, letters, or roman numerals at the start of each line.
💡 Common Use Cases
- Number lines in code for documentation
- Add step numbers to instructions
- Create numbered lists from plain text
- Add roman numeral labels to outline items
Add line numbers to any text — for documentation, instructions, or code
Line numbers turn an unstructured list into a clear, referenceable document. They are essential for code samples in documentation, for step-by-step instructions, for legal documents, for cited references, and anywhere else you need to be able to say "look at line 14". This Add Line Numbers tool inserts numbering of any style — Arabic digits, letters, Roman numerals, with custom separators, with optional zero-padding — in one operation.
How to use it
Drop your code snippet, instruction list, or outline into the editor. Pick the numbering style: 1, 2, 3 (standard digits), a, b, c (lowercase letters), A, B, C (uppercase letters), i, ii, iii (lowercase Roman numerals), or I, II, III (uppercase Roman numerals). Choose your starting number and your separator (a period, a parenthesis, a dash, a colon — whatever fits). Click Apply. The output appears with numbers prepended to every line.
Numbering styles in detail
Arabic numerals (1, 2, 3...) are the default and the right choice for technical documentation, code samples, recipes, and most ordinary lists. Zero-padding (01, 02, 03... or 001, 002, 003...) makes the result line up neatly in fixed-width display, which matters in code blocks and terminal output.
Letter numbering (a, b, c... or A, B, C...) works well for sub-items in a nested outline. If you have a top-level numbered list and want sub-items, alternating between numbers and letters at each level is the classic style.
Roman numerals (i, ii, iii or I, II, III) are traditional for book chapter introductions, formal documents, and outline-style writing. They become hard to read past about XX, so they are best for short lists.
Custom prefix. Beyond style, you can specify a prefix that precedes the number itself — for example "Step " to produce "Step 1.", "Step 2.", or "Q." to produce "Q.1", "Q.2".
Real-world uses
Code documentation. When you publish a code sample on a blog, in a Stack Overflow answer, or in API documentation, numbered lines make it much easier to discuss specific bits ("In line 7, we do X"). Many code blocks include line numbers automatically, but if you are writing in a context that does not, this tool gives you them.
Recipe and procedure writing. Numbered steps are easier to follow than unnumbered ones — the reader can keep their place, return after an interruption, and reference specific steps for questions.
Legal and reference documents. Contracts, statutes, court filings, and technical specifications all use numbered lines or paragraphs for precise reference. Adding numbering to a draft is the first step toward a publishable document.
Survey and questionnaire prep. Numbering questions (Q1, Q2, Q3...) makes the survey clear to respondents and the responses easier to analyse.
Bug reports and tickets. "Reproduce by following these numbered steps" is much clearer than "do this, then do this, then do this". Adding numbers transforms a wall of text into an executable script.
Teaching materials. Numbered exercises in a textbook chapter let students discuss specific problems with each other and with the teacher.
Bibliography and citation lists. Many academic styles use numbered references in a bibliography ([1], [2], [3], etc.). This tool generates them in seconds.
Tips and tricks
If you want every line to have a number but also want to preserve blank lines as spacers, the tool offers a "skip blank lines" option that does not number empty lines. This keeps your visual paragraph breaks intact while only numbering content lines.
For very long lists, zero-pad your numbers so that they align nicely. A list of 100 items numbered 001, 002, 003...100 looks neat; numbered 1, 2, 3...100 does not.
If you need numbering to restart at a specific value (e.g., continuing a list from a previous document), set the starting number accordingly. The tool will number from there.
For Markdown-formatted numbered lists, you usually only need "1." in front of every line and Markdown will automatically number them in order. This tool produces literal numbering, which is what you want for plain text or rich text contexts.
Privacy
Line numbering runs entirely in your browser. Your text is never uploaded, never stored, and never logged. Safe for confidential documents, internal procedures, source code, and any other content you would not want sitting on a server.