Line Prefix and Suffix Adder – Wrap Every Line at Once
Almost every day someone is handed a bare column of values and needs it in a shape another system will accept. A list of country codes has to become a quoted SQL IN list. A list of package names has to become npm install commands. A list of menu items has to become <li> tags. A block of code has to be commented out without losing its indentation. A line prefix and suffix adder turns each of those chores into two text fields and a live preview, instead of a multi-cursor session in an editor or a throwaway regex you will get wrong once.
Prefix, suffix, or both
The core operation is simple: every line becomes prefix + line + suffix. Supply only a prefix of - and a plain list becomes a Markdown bullet list. Supply only a suffix of ; and every line becomes a terminated statement. Supply both — <li> and </li> — and each line is wrapped. Blank lines are skipped by default, so the empty separator between two blocks does not turn into a stray bullet, and the transformation is applied line by line rather than to the text as a whole.
Building valid lists: the last-line problem
The reason hand-built lists break is the trailing separator. Append a comma to every line and the final one carries a comma too, which is a syntax error in SQL, JSON, and most function-argument lists. Turning on skip suffix on the last line emits the final transformed line without it. The dedicated wrap in quotes mode goes further: it keeps the closing quote on that last line and drops only the separator, so US CA MX becomes "US", "CA", "MX" — valid the moment you paste it. Quotes already inside a line can be escaped automatically so an entry such as the "bahamas" does not terminate the string early.
{n} inserts an auto-incrementing counter with your own start value, step, and zero-padding, {i} gives the 0-based index, and {line} repeats the line content. A prefix of {n}. produces a numbered recipe; a template of npm install {line} --save produces a runnable shell block.Commenting code without destroying alignment
Prepending // at column zero flattens a nested block and makes the result unreadable when you uncomment it later. Preserve indentation inserts the prefix after the existing leading spaces or tabs, so a function body keeps its structure. The inverse remove prefix and remove suffix modes undo the change using a guarded strip: a line is only shortened when it genuinely begins or ends with the string you supplied, so a mixed block of commented and uncommented lines survives intact and nothing is silently truncated.
Preparing the text before it is wrapped
Real input is rarely tidy. Each line can be trimmed before wrapping so invisible trailing spaces do not end up inside your quotes, duplicates can be dropped, and the list can be sorted A→Z or Z→A or reversed first. A line range restricts the whole transformation to lines N through M, which is how you wrap a single section of a long file. Escape sequences such as \t and \n typed into the affix fields are interpreted as real tabs and newlines.
Line endings and what the numbers mean
Windows terminates lines with \r\n while Unix, macOS, and Git use a bare \n. The detected convention is shown as a badge, preserved by default, and can be forced either way on the output — the usual fix for a file that opens as one giant line. Every pass reports how many lines were transformed and how many were skipped and why, alongside the character delta, the true UTF-8 byte size, and the longest and shortest resulting line. The result copies to the clipboard, downloads as .txt or as a CSV pairing each original line with its transformed version, and can be swapped straight back into the input for a second pass. Everything runs locally in your browser, so internal identifiers and unreleased code never leave your machine.