When two people are reviewing a plain-text excerpt, line numbers let them point to the same place. The TinyToolbox Add Line Numbers to Text tool prepends a number and a space to each line. You can start at 1 for a standalone excerpt or at the original line number when the excerpt needs to refer back to a larger file.
The numbers become part of the copied text. Keep an unnumbered copy for any application that reads the original content, especially code, configuration, or data. Use the numbered copy for comments, documentation, or a handoff in which the reader needs reference points.
Number your first excerpt
- Open Add Line Numbers to Text.
- Paste the excerpt into Input text.
- Set Start at to the first number you want, such as 1 or 24.
- Select Run tool.
- Check the first and last numbered lines, then select Copy result.
Try these three lines:
Open the side gate.
Check the signs.
Lock the equipment room.
With Start at set to 24, the result is:
24 Open the side gate.
25 Check the signs.
26 Lock the equipment room.
The starting number belongs to the first line. Each following line receives the next number. For an excerpt with three lines, the last number is the start plus two. If you change the starting value after running the tool, run it again before copying the result. Confirm the first line number in the output instead of relying on the number currently shown in the input field.
Use a whole number for conventional line references. For an excerpt running from line 24 through line 26, preserve both the starting number and the three original lines so the results can be checked against the source document. If the output is for instructions and you want zero-based references, an input of zero gives the first line the label 0. Let the numbering convention of the receiving project determine the starting value.
Count actual line breaks separately from wraps
The tool splits the text at newline separators. It treats a line feed or a carriage-return and line-feed pair as a boundary, then joins the output with line feeds. The widths of the text boxes do not enter this calculation. A long line can wrap visually over several rows and still receive one number.
Try pasting a long sentence with no newline in it. Shrink the browser window until it wraps. Run the tool and note that only one prefix was added. Now place the cursor in the source and press Enter to create a physical break. Run it again. Each of the two parts receives its own number. If an editor shows both hard breaks and soft wrapping, use its line-number display to identify the actual lines you want to reference.
This distinction matters for a pasted log. An event can contain a long message that wraps onscreen. If the message remains one physical line, it gets one label. If it actually contains a newline, its continuation gets another label. For a review that counts log events rather than physical lines, preserve each event’s original identifier and use that alongside the numbered excerpt when possible.
Decide whether blank lines should occupy a number
Empty lines take part in the sequence. For example, starting at 8 with a blank row between two instructions produces the following output. The line labeled 9 contains the prefix and its separator space.
8 Check the route.
9
10 File the report.
This is useful when the numbers need to match a source file that also counts empty lines. If your goal is to number action items without gaps in the visible steps, first prepare a working copy with one actual line per intended item. Preserve a source-matching copy if one is needed for review. Removing blank lines changes the reference numbers for everything after them.
A final newline can produce a numbered empty row at the end. For example, a source containing one instruction with a trailing line break can give a second number with no visible content beside it. Check this when the result ends with a number alone. If it represents an actual line in the source, keep it for source alignment. If it entered the input during copying and has no purpose in the reference, prepare the excerpt again without that trailing break.
Leading indentation within a line stays after the new prefix. If the original begins with spaces or a tab, the output starts with the number, the separator space, and then that indentation. The receiving editor may display tabs at different widths, especially when the lines move from one column layout to another. For a code review, use a plain-text block or a format that preserves whitespace so the hierarchy stays visible.
Continue the original sequence across excerpts
Suppose you are reviewing lines 108 through 112 of an operations note. Copy those five physical lines and enter 108 under Start at. The first label should be 108 and the last should be 112. If the last label is 113, check whether an extra leading or trailing newline was copied. If it is 111, check that the selection included the full excerpt and that you are reading the last number rather than a wrapped screen row.
When excerpts are contiguous, calculate the next start from the last verified number. If the first excerpt ends at 112, start the next at 113. If you skip ten intervening source lines, copy the second excerpt with its actual first line number instead. This allows comments to point back to the source. Add a marker in the review document if the gap needs to be obvious to a reader.
For example, a reviewer might quote lines 108–112 and 123–126, with an omission between them. Run the first chunk with a start of 108 and the second with a start of 123. Put the reader-facing omission marker between the numbered outputs, outside the source numbering. If you put that marker into the same input and let the tool number the combined passage, every label after the marker can disagree with the original file.
Include the file or document version beside each excerpt. When a new version adds a line above it, the excerpt’s real source number can move even if the quoted text does not change. Verify the line number again before reusing an older review comment. Combining a filename, version, and line number gives readers a more reliable reference than a bare label such as “line 108.”
Choose numbers that work for review and handoff
Line references can help when writing feedback on a short procedure. Imagine a draft has separate lines for turning off equipment, checking signage, and closing the room. Number the excerpt from one if everyone will review just those lines. A comment such as “add the responsible person to line 2” then points to one sentence in the numbered copy. If contributors will instead search a longer manual, use the actual line numbers from that manual and identify the edition you copied.
Check how the output will look if the range crosses from one digit to two, such as 8 through 12. The tool adds one separator space and does not pad shorter numbers. In a fixed-width display, the text after 9 will start one character earlier than the text after 10. That spacing is normal. If the receiving document needs aligned columns, use its own formatting controls. Keep the plain numbering intact when readers need to copy the reference back into another text tool.
Also decide how to treat a heading. If it belongs to the excerpt as a line in the source, leave it inside the paste so its number agrees with the document. If it is a label identifying the excerpt for readers, put it above the numbered block after the run. A heading introduced for presentation should not silently shift every source reference by one.
Check the copied version before sharing
Compare the first and last labels with the range you intended, then spot-check a middle line and any empty row. Look for a header that was moved inside the sequence or a footer selected by accident. If someone will use the exact original text, make it easy to identify the separate unnumbered source. Adding numeric prefixes changes the literal contents and can make a command or configuration line invalid when pasted into its operational destination.
When reviewing changes across two versions, number them independently from their corresponding source positions. A line can contain the same words at a different position after an insertion or deletion. Keep the source text and label with their version so reviewers can tell a wording change from a reference change. If you only want to compare wording, work from unnumbered text and add the labels back for the final handoff.
A finished handoff can say “numbered for review, source maintenance log, lines 108–112, blank rows retained.” This records the range and what the numbers mean. A reader can look up line 110 directly and understand why an apparently empty row also received a label. For a revised excerpt, repeat the check from the current source rather than adding numbers to a copy that is already numbered.