Add Prefix / Suffix to Lines

Add text to the start and/or end of every line. 🔒 Runs in your browser

Output

How to use the Add Prefix / Suffix to Lines

  1. Paste your text in the Input box, drop a file on it, or click "Example" to try it.
  2. Adjust the options (prefix, suffix, skip empty lines) to fit your needs.
  3. The output updates instantly as you type.
  4. Click Copy or Download. Use "Use as input" to chain another operation.

About this tool

Add text to the start and/or end of every line. It is part of the free Line Tools collection on Online Tools Harbor. Everything happens locally in your browser, so it is fast and private.

Frequently asked questions

Is the Add Prefix / Suffix to Lines free?

Yes. The Add Prefix / Suffix to Lines is completely free to use, with no sign-up and no limits on normal use.

Is my data safe?

Yes. This tool runs entirely in your web browser using JavaScript. Your text is never uploaded to our servers.

Is there a size limit?

There is no fixed limit: it depends on your device. Several megabytes of text are processed in a fraction of a second on most computers.

Does it work on mobile?

Yes, it works in any modern browser on phones, tablets and computers. No app to install.

Related tools

Sort LinesSort lines alphabetically, numerically, by length or in natural order.Remove Duplicate LinesDelete repeated lines and keep only unique ones, in their original order.Remove Empty LinesRemove blank lines (including lines with only spaces) from text.Reverse Line OrderFlip the order of lines so the last line comes first.Shuffle LinesRandomly shuffle the order of lines in a list.Add Line NumbersNumber each line of text, with custom start and separator.Filter Lines (Keep / Remove Lines Containing)Keep or remove all lines that contain a word, phrase or regex.List to Comma SeparatedJoin lines into one comma-separated (or custom) string, optionally quoted, e.g. for SQL IN clauses.Comma Separated to ListSplit comma-separated (or any delimiter) text into one item per line.