Add a prefix or suffix to every line

Paste a list, add a text at the start, the end, or both, on every line.

Original text
Result

Line prefix and suffix is a free tool that runs entirely in your browser, with no data ever sent to a server. Add a text at the start, the end, or both, on every line.

What it's for

Turning a list of values into instructions ready to paste elsewhere : wrapping each line in quotes and a comma for a code array, prefixing each filename with a path, or adding a trailing semicolon.

What this tool does not do

This tool only applies the transformation described above, with no spelling correction and no understanding of the text's meaning. A text of tens of thousands of lines is processed instantly ; beyond that, the only limit is your device's memory.

Frequently asked questions

Do empty lines get the prefix too?

Not by default : the "Skip empty lines" checkbox leaves them untouched. Uncheck it to treat them like any other line.

Is my data sent to a server?

No : the text you type or paste is processed entirely in your browser, on your device. It is never transmitted to a server.

Do I need to create an account or install anything?

No : the tool works directly on this page, with no sign-up and no install.