TT Text Tools

Add Prefix & Suffix to Each Line

Add text to the start and end of every line at once: bullets, quotes, HTML tags, commas or line numbers. Free, fast and private.

🔒 Runs entirely in your browser — nothing is uploaded

Tip: {n} in the prefix or suffix inserts the line number.

Advertisement

Wrap every line with text in one go

Editing a long list line by line is slow and error-prone. This tool adds a prefix to the beginning and a suffix to the end of every line at once. Typical jobs include turning a list of words into Markdown bullets, wrapping values in quotes and adding a trailing comma for code, putting each line inside <li> tags, prefixing log lines with a label, adding a file extension to a list of names, or commenting out a block of code with // or #.

Presets fill in the most common combinations with one click, and you can type anything you like in the two boxes, including spaces, punctuation, HTML and emoji. The result updates as you type, so it is easy to experiment. Empty lines are skipped by default so blank separators stay blank; untick the option if you want them wrapped too. "Trim lines first" removes indentation and trailing spaces before the prefix and suffix are added, which keeps the output tidy when the source came from a PDF or a web page.

Line numbers and reverse mode

Write {n} in the prefix or suffix to insert a running line number. "{n}. " creates a numbered list, "Step {n}: " labels instructions, and "id_{n}" generates simple identifiers. Numbering skips empty lines when they are being skipped, so the sequence stays continuous.

Need to undo a change? Tick "Remove instead of add" and the same prefix and suffix are stripped from every line where they appear. Lines that do not start or end with that exact text are left untouched, which makes it safe to clean up partially formatted lists — for example removing "- " bullets or trailing semicolons.

Works locally

Everything happens in your browser. Your lists, code and data are never uploaded, and the tool keeps working offline after the page has loaded.

How to use

  1. Paste your linesAdd a list, a column of values or any multi-line text.
  2. Enter a prefix and suffixType the text to add before and after each line, or click a preset such as bullet, quoted or <li>.
  3. Adjust the optionsSkip empty lines, trim lines first, use {n} for line numbers, or switch to remove mode.
  4. Copy the resultCopy the wrapped lines into your code, document or spreadsheet.

Frequently asked questions

How do I add text to the beginning of every line?
Type it in the Prefix box. Leave the suffix empty if you only want to add text at the start.
Can I number the lines?
Yes. Put {n} anywhere in the prefix or suffix, for example "{n}. " for a numbered list or "item-{n}: " for IDs. Skipped empty lines are not numbered.
Can I remove a prefix or suffix instead?
Yes. Tick "Remove instead of add" and the tool strips the prefix from the start and the suffix from the end of every line where they appear.
Is there a limit on the number of lines?
No fixed limit. Tens of thousands of lines are processed instantly in a modern browser.
Advertisement