Add Text to Each Line Online

Prepend or append text to every line instantly with placeholder support.. Free, no signup, works in your browser.

Text

About Add Text to Each Line

This tool adds custom text to the beginning or end of every line in your input. Use it to add bullet points, prefixes, suffixes, line numbers, HTML tags, or any repeated string to each line. The %N% placeholder inserts the line number and %L% inserts the original line content, giving you full control over the output format. Choose from several numbering styles including padded numbers. Ideal for formatting lists, generating numbered content, wrapping lines in tags, or preparing data for import. All processing runs in your browser — your text never leaves your device.

Frequently Asked Questions

How do I add a prefix to every line?
Paste your text, check 'Add text to the beginning of each line', then type your prefix. For example, type '- ' to turn lines into a bulleted list, or '> ' to format as blockquotes.
What does the %N% placeholder do?
%N% is replaced with the current line number. For example, typing '%N%. ' as the prefix produces '1. first line', '2. second line', etc. Select a numbering style from the dropdown to control how numbers appear.
Can I add text to both the beginning and end of each line?
Yes. Check both options and type your desired prefix and suffix. For example, prefix '<li>' and suffix '</li>' to wrap each line in HTML list-item tags.
What is the %L% placeholder?
%L% is replaced with the original line content. This is useful in the prefix or suffix field when you want to restructure each line. For example, a prefix of '%N%: %L% —' would produce '1: apple — apple'.
What numbering styles are available?
Five styles: no numbering, from 0 (0, 1, 2...), from 1 (1, 2, 3...), padded from 0 (00, 01, 02...), and padded from 1 (01, 02, 03...). Padded numbers use leading zeros based on the total number of lines.
Is there a limit on how many lines I can process?
No hard limit. The tool processes text in your browser, so it can handle thousands of lines instantly. Very large texts may take a moment depending on your device.

Related Tools

View All Text