← Back to Text & Writing Tools

Add Prefix to Each Line

Put the same text at the start of every line — turn a plain list into bullets, quotes, or commented-out code.

Checking tool availability…

Add Prefix to Each Line works on your text locally in your browser.

Start every line the same way

Typing the same characters in front of dozens of lines is slow and easy to get wrong. Enter the lines and a prefix — a bullet marker, a quote sign for an email reply, a comment symbol for code, a label, or a path — and it is added to the start of each line at once. Blank lines are left alone by default, so paragraphs and gaps in a list stay clean.

How to add a prefix to every line

  1. Type or paste your lines, or choose Upload Document to open a .txt, .md, .docx, or .pdf file.
  2. Enter the prefix, including any space you want after it. Turn on the blank-lines option if empty lines should get it too.
  3. Choose Copy Result, or Replace Input with Result to keep working here — Undo Replace brings the original back.

How the prefix is added

  • The prefix is inserted exactly as typed — a trailing space in the prefix stays, and nothing is trimmed from your lines.
  • It goes before any indentation a line already has.
  • Empty lines and lines containing only spaces are skipped unless you include them; the stats show how many were skipped.
  • Line order and line breaks are unchanged, including Windows line breaks.
Add Prefix to Each Line examples
LinesPrefixResult
Milk Eggs Bread“- ”- Milk - Eggs - Bread
First point Second point“> ”> First point > Second point
const a = 1; const b = 2;“// ”// const a = 1; // const b = 2;

Your text stays on your device

  • The prefix is added by JavaScript running in your browser.
  • Your text is never uploaded to Looty Tools or any other server.
  • Uploaded documents are opened and read in your browser; the file itself is never sent to Looty Tools.
  • Nothing is stored — refreshing or closing the page clears the text and the prefix.

Limitations

  • Uploads accept .txt and .md files up to 5 MB, Word .docx files up to 15 MB, and PDFs up to 25 MB and 50 pages. Older .doc files are not supported, and scanned or image-only PDFs have no text to use.
  • Every line gets the same prefix; automatic numbering (1., 2., 3.) is not supported.
  • The prefix box is a single line, so a prefix cannot contain a line break.
  • If your text mixes Windows and Mac/Linux line breaks, the result uses one style throughout — Windows breaks if any were present.
  • Formatting such as bold or real bullet lists from Word is not kept, because the tool works with plain text.

Related text tools

Add Prefix to Each Line FAQ

What happens to blank lines?
By default they are left empty, so a list with gaps does not end up with stray “- ” lines. Turn on “Also add the prefix to blank lines” to prefix every line, including empty ones.
How do I get a space after the prefix?
Type the space as part of the prefix — for example a hyphen followed by a space. The prefix is added exactly as typed and is never trimmed.
Can it number the lines 1, 2, 3?
No. The same prefix is added to every line. Numbering needs a different value on each line, which this tool does not do.
What about lines that are already indented?
The prefix goes at the very start of the line, before any existing spaces or tabs, so the indentation stays after it.
Can I add text to the start and the end of each line?
Yes, in two steps: add the prefix here, choose Replace Input with Result or copy the result, then use Add Suffix to Each Line for the ending.
Can I upload a Word document or PDF instead of pasting?
Yes. Upload Document accepts .txt, .md, Word .docx, and text-based .pdf files, or you can drop a file onto the text box. The file is read in your browser — it is not sent to Looty Tools — and its text replaces whatever is in the box. Scanned PDFs without a text layer and older .doc files are not supported.
Is my text uploaded?
No. The prefix is added in your browser; your text is never sent to Looty Tools or saved.

More from Looty

Explore Looty’s Ecosystem

Discover more ways Looty can help you learn, organize, create, and make an impact.