Add Prefix to Each Text Line
Add a chosen prefix to the start of every line.
Text Tools Runs in your browser
How do you add a prefix to each line?
Adding “- ” in front of every line turns a plain list of items into a ready-made Markdown bullet list; adding “> ” quotes it and “// ” comments it out. The string you enter goes at the start of each non-empty line, while blank lines are skipped so no stray markers appear on empty rows. Pair it with the remove-prefix tool to reverse the job later.
How to use the Add Prefix to Line
- 1 Enter your list, one item per line.
- 2 Type what should go in front, like “- ” for Markdown bullets or “> ” for quotes.
- 3 Every non-empty line picks up the prefix; blanks are skipped.
- 4 Copy the finished list.
What you can use it for
- Turning a plain list into Markdown bullets.
- Commenting out lines of code in bulk.
- Labelling every line with a tag.
- Quoting lines with a leading > character.
Frequently asked questions
Do empty lines get the prefix too?
No. Blank rows are skipped, which keeps separators between list sections clean.
What prefix turns lines into a Markdown list?
“- ” (dash then space). Numbered lists need manual numbers, since the same string is applied to every line.
Is there a way back?
Run the output through the remove-prefix tool with the identical string and the list returns to its original form.
Related tools
More Text Tools
More tools like this:
All Text Tools