Developer Lists
Add prefix to lines
What to do
Transformed in your browser · nothing is uploaded
Local · blank lines dropped, not prefixed
Advertisement
320 × 100
Puts the same string at the start or end of every line. Blank lines are dropped rather than getting a lonely prefix.
How to use the add prefix to lines
1 Paste your text into the first box.
2 Choose what you want done to it.
3 Copy the result, or save it as a text file.
This is the small operation that turns a pasted list into whatever format something else wants: a markdown bullet list, a quoted email reply, a SQL IN clause with quotes and commas, a set of CSS class names. Doing it with find-and-replace on the line break works but breaks on the last line, which has no break after it — that off-by-one is why a dedicated operation is worth having. Combining a prefix and a suffix run is the usual way to build quoted lists: add `'` to both ends, then join with commas.
Questions
They are dropped rather than getting a prefix with nothing after it.
Sources
MDN — working with stringsAdvertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING