Add a suffix to every line

Add suffix appends a string of your choice to the end of every line, every paragraph, or once at the bottom of the whole block. The default scope is per-line. Toggle Skip Empty on to leave blank lines bare. To attach text on the left side of each line instead, see add prefix to each line.

Input
Line 1:1 LF cloud_done Saved locally
Result Add Suffix to Lines
0 lines 0 chars

Append to every line, paragraph, or the whole block

Suffix is the string to attach. Scope picks where it goes. Per Line (the default) appends to every line. Per Paragraph appends once at the end of each paragraph (a paragraph is a run of lines separated by two or more line breaks). Whole Text appends once to the very end of the input.

Skip Empty uses line.trim() === '', so lines containing only spaces or tabs count as empty and are left alone. With the paragraph scope the same check is applied to whole paragraph chunks. Whole-text scope ignores the toggle because there is only one insertion point.

Common uses: terminating each line with a semicolon for SQL or JS (; per line), turning a list into one comma-separated string (, per line, then join externally), or adding a footer marker ([end] whole text). To wrap each line on both sides at once use wrap each line.

How to use add a suffix to every line

  1. 1Paste your text into the input panel on the left.
  2. 2Type the string you want to append into the Suffix field.
  3. 3Pick a Scope: Per Line, Per Paragraph, or Whole Text.
  4. 4Toggle Skip Empty on if you want blank lines or blank paragraphs left untouched.
  5. 5Click Copy or Download in the output header to take the result.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What this tool actually does

Three scope modes, line is the default

Per Line splits on \r?\n and appends to each piece. Per Paragraph splits on two-or-more line breaks and appends to each text chunk. Whole Text just appends once to the entire string.

Skip Empty is whitespace-aware

A line is treated as empty if trim() returns an empty string, so spaces and tabs do not block the skip. Empty lines pass through with no suffix appended.

Paragraph mode preserves separators

In Per Paragraph mode the blank-line separators between paragraphs are kept exactly as they were in the input, including the count of consecutive newlines.

Empty suffix is a no-op

If you leave Suffix empty the tool returns the input unchanged. Nothing is appended in any scope.

Line endings are normalised on output

Per-line and per-paragraph modes use \n in the join, so CRLF input becomes LF output. Whole-text mode preserves the input verbatim apart from the appended string.

Worked example

Suffix ;, scope Per Line, Skip Empty off. Turn the toggle on and the blank line between the two queries stays bare.

Input
SELECT id
FROM users

SELECT name
FROM users
Output
SELECT id;
FROM users;
;
SELECT name;
FROM users;

Settings reference

Behaviour Effect on output
Suffix empty Input passes through unchanged.
Scope = Per Line Suffix is appended to every line. Default mode.
Scope = Per Paragraph Suffix is appended once at the end of each paragraph.
Scope = Whole Text Suffix is appended once to the very end of the input.
Skip Empty off Every line or paragraph gets the suffix.
Skip Empty on Lines or paragraphs whose trim() is empty pass through unchanged.
Line endings Per-line and per-paragraph modes normalise CRLF to LF on output. Whole-text mode preserves input verbatim.

FAQ

How is a paragraph defined?
Two or more consecutive line breaks separate paragraphs. A run of non-empty lines with single line breaks counts as one paragraph.
Can I append a multi-character suffix?
Yes. Suffix accepts any string. Common choices are ; for SQL terminators, , for CSV-style joining, or <br> for HTML.
Does Skip Empty treat space-only lines as empty?
Yes. The check is line.trim() === '', so spaces and tabs count as blank.
How do I add a prefix instead?
Use add prefix to each line for the left side, or wrap each line to do both at once.
Does anything upload?
No. The transform runs entirely in your browser. Your text never leaves the page.