TextArray
100% local

Add prefix and suffix

Add text to the beginning or end of every line at once.

Input
Output

Add prefix and suffix

This tool adds a piece of text to the start of every line, the end of every line, or both at once. Type the prefix and suffix, paste your list, and each line comes back wrapped — no manual editing, no spreadsheet formulas, no editor macros.

It saves real time in everyday tasks: turn a plain list into bullet points with a "- " prefix, quote every line for a CSV or SQL statement by using a quotation mark on both sides, add a comma suffix to build an array literal, prepend "https://" to bare domains, or wrap translation strings in quotes and trailing commas for a JSON file. Anything you would otherwise do line by line, this does in one pass.

Two options keep the output clean. Skip empty lines, on by default, leaves blank lines untouched so a prefix does not appear on otherwise empty rows. Trim lines first removes leading and trailing whitespace from each line before the prefix and suffix are attached, which is handy when the source was copied from a spreadsheet or terminal and carries stray spaces. Windows (CRLF) and Unix (LF) line endings are both understood.

The tally under the output shows how many lines were modified and the size of the result, updating live as you type. Everything runs locally in your browser — your text is never uploaded, so lists with private data such as emails, URLs or internal identifiers never leave your device. Copy the result or download it as a .txt file when you are done.

FAQ

Can I add a prefix and a suffix at the same time?
Yes. Fill in both fields and each line is wrapped in one pass, for example a quotation mark on each side.
What happens to empty lines?
With "Skip empty lines" on, blank lines pass through unchanged. Turn it off to wrap them too — useful when every row must have the prefix.
Can I remove extra spaces before adding text?
Enable "Trim lines first" and each line is stripped of leading and trailing whitespace before the prefix and suffix are attached.
Does it work with spaces or tab characters in the prefix?
Yes. The prefix and suffix are used exactly as typed, including spaces, so "- " produces a bullet followed by a space.
Is my text uploaded anywhere?
No. The tool runs entirely in your browser and your text never leaves your device.