Use %N% for the line number and %L% for the line itself.
Help Us Improve
—
(—)
Add text to each line online
Prepend or append text to every line. Use line numbers with %N% or repeat the line with %L%, then copy or download the result.
What is add text to each line online?
Line prefix and suffix features
Instant updates
New text refreshes as you paste, edit templates, or change line counting.
Prefix each line
Add constant text or numbered labels at the start of every row.
Suffix each line
Append commas, spaces, quotes, or custom text at the end of each line.
%N% line numbers
Insert auto-incrementing numbers with four counting styles.
%L% line content
Repeat the original line inside your prefix or suffix template.
Copy and download
Export the updated block as plain text in one click.
How to add text to every line
Paste your lines
Enter one item per line in Original text.
Set prefix or suffix
Enable beginning or end text, then use %N% or %L% if needed.
Copy or export
Use Copy all, Download text, or Open in new tab.
Tips for prefix and suffix templates
- 01
One item per line
Line breaks define rows before prefix or suffix is applied.
- 02
Start with %N%.
A numbered prefix is the fastest way to build ordered lists.
- 03
Use suffix for delimiters
Append commas or spaces when preparing concat-style output.
- 04
Pick padding early
Choose 00 or 01 modes when filenames or IDs need fixed width.
- 05
Download long outputs
Text export is safer than clipboard for very large lists.
When to prepend or append lines
Numbered lists
Prefix rows with 1. 2. 3. or zero-padded indexes.
Quote wrapping
Add opening and closing characters on each line for code or CSV prep.
Delimiter suffixes
Append commas or spaces when building concatenated output.
Bulk labeling
Insert the same tag before many lines in logs or inventories.
Template expansion
Combine %L% with fixed text to repeat line content in a pattern.
Why use this line text tool
Immediate
No run button required for standard use.
Flexible templates
Mix static text, line numbers, and original line content.
Private
All processing stays in the browser.
Portable output
Copy, download, or open output in a separate tab.
Technical details
- Input format
- Plain text split by newline characters.
- Normalization
- Windows and Unix line endings are normalized before processing.
- Placeholders
- %N% inserts the formatted line number; %L% inserts the original line.
- Order of operations
- Prefix template is applied first, then suffix template, on each original line.
- Runtime
- Client-side in modern browsers.
Sources & References
“Newline characters (LF, CRLF) serve as line terminators in plain text. Cross-platform normalization converts CRLF to LF before text processing to ensure consistent line splitting.”
Newline character and line endings normalization: Input text is normalized by converting Windows CRLF to Unix LF before splitting on newlines, ensuring consistent line-by-line prefix and suffix application regardless of source platform. en.wikipedia.org/wiki/Newline
“String templating replaces placeholders in a template string with computed or dynamic values. Common patterns include %N% for line numbers and %L% for original line content.”
String templating with placeholders: The prefix and suffix templates support %N% (formatted line number) and %L% (original line content) placeholders, applied in order to each line after normalization. developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
“The String.prototype.split() and Array.prototype.join() methods are fundamental for converting between multi-line text and arrays of lines in browser-based text utilities.”
JavaScript string split and join for text processing: The tool splits input text by newline characters, applies prefix and suffix templates to each element, and joins the results back into a newline-separated block for output. developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split