Add a Prefix to Text Lines

Simplify your text tasks with three simple steps, Free!

The "Add a Prefix to Text Lines" tool allows you to quickly add a specified prefix before each line of text. You can choose between single prefix mode (adding the prefix only once at the beginning), line-by-line mode (adding the prefix to every line), or paragraph mode (adding the prefix to each paragraph). The tool also offers an option to skip empty lines when in line-by-line mode.

Input Text Lines

Text with Result

Tool Options

Prefix Data

Enter words, letters, or numbers to add in front of the text.

Text Prefix Mode

Attach prefix only once at the very beginning of text.

Attach prefix to the beginning of every text line.

Attach prefix only to paragraphs.

Empty Lines

Don't prefix empty lines.

This option only works with line-by-line mode.

What Is a Text Prefixer?

With this tool you can prepend a prefix at the beginning of text. You can prepend words, letters, or numbers. Anything that you specify in prefix option will get affixed to text. It has three modes of operation – single-prefix function that will add prefix text only once at the very beginning, line-by-line function that will affix every text line, and paragraph function that will add text to paragraphs only (a paragraph is one or more text lines followed by two new lines.) There's also a skip-empty-lines function, which when selected will avoid adding prefix to blank text lines.

Tool Illustration

Add a Prefix to Text Lines Examples

Click to try!

Line-by-line Prefixing

Add a prefix to each line of text using the line-by-line mode.

First item
Second item
Third item
Fourth item
Fifth item
- First item
- Second item
- Third item
- Fourth item
- Fifth item

Numbered List Creation

Create a numbered list by adding sequential numbers as prefixes.

First item
Second item
Third item
Fourth item
Fifth item
1. First item
1. Second item
1. Third item
1. Fourth item
1. Fifth item

Comment Code Lines

Add a comment prefix to each line of code.

function helloWorld() {
  console.log('Hello, world!');
  return true;
}
// function helloWorld() {
//   console.log('Hello, world!');
//   return true;
// }

Skip Empty Lines

Add a prefix to each line while skipping empty lines.

First paragraph

Second paragraph

Third paragraph
> First paragraph

> Second paragraph

> Third paragraph

Paragraph Mode

Add a prefix to each paragraph instead of each line.

First paragraph with multiple lines.
This is still part of the first paragraph.

Second paragraph starts here.
This is still part of the second paragraph.

Third paragraph is here.
§ First paragraph with multiple lines.
This is still part of the first paragraph.

§ Second paragraph starts here.
This is still part of the second paragraph.

§ Third paragraph is here.

Single Prefix Mode

Add a prefix only once at the beginning of the entire text.

This is a document title

This is the first paragraph of content.
It continues on this line.

This is the second paragraph.
# This is a document title

This is the first paragraph of content.
It continues on this line.

This is the second paragraph.

Privacy Policy

Attention: All tools are done in your browser using JavaScript. We don't send a single bit about your input data to our servers. There is no server-side processing at all.