Line Formatting Tools

Add Prefix to Each Line

Put the same text at the start of every line.

PrivateYour text is processed on your device and never uploaded.

Add Prefix to Each Line is a browser-based text tool on TextToolsBase. Put the same text at the start of every line. To use it, paste or type your text and view the result directly in your browser — no signup and nothing to install.

Advertisements
Input
Result
0 chars · 0 lines
Advertisements

Adding the same text to the front of many lines by hand is slow and easy to get wrong on a long list.

Add Prefix to Lines puts your chosen string at the start of every line in one pass, leaving the rest untouched.

How to use Add Prefix to Each Line

  1. Paste the lines you want to change into the input box.
  2. Type the prefix string, and Add Prefix to Lines places it at the start of each line.
  3. Copy the prefixed lines, or download them as a text file.
Advertisements

Use cases

  • Turning bare values into a quoted or bulleted list with a leading marker.
  • Prepending a comment marker to each line of a snippet.
  • Adding a fixed tag to the front of every row before import.

Good to know

Add Prefix to Lines inserts your exact prefix, including any spaces, before the first character of every line. Empty lines also receive the prefix, so the column stays aligned.

Frequently asked questions

Does the prefix include spaces I type?

Yes. Whatever you enter is added literally, so trailing spaces in the prefix become part of each line.

Will empty lines get the prefix as well?

Yes. The prefix is added to every line, including blank ones, which keeps a leading marker consistent.

Does it change anything after the prefix?

No. Only the start of each line changes; the existing text on the line is left exactly as it was.

Related Line Formatting Tools