Add Suffix to Each Line

Text Tools

How to use the Add Suffix to Each Line

Append a suffix to all lines in seconds:

1

Paste your text

Paste any multi-line text into the input panel.

2

Enter or select a suffix

Type your custom suffix, or choose a common preset like ';', ',', or '.md'.

3

Toggle empty line behavior

Enable 'Skip empty lines' to leave blank lines unaffected, or disable it to suffix every line uniformly.

4

Copy or download

Copy the result to clipboard or download as a .txt file for use in your project.


When to use this tool

Use this whenever you need to batch-append text to multiple lines:

  • Adding semicolons to the end of each line in a list of SQL column values
  • Appending file extensions (.jpg, .ts, .json) to a list of file names
  • Adding trailing commas to each item when preparing a JSON array manually
  • Appending CSS units (px, em, rem, %) to a list of numeric values
  • Adding line continuation characters (\) to shell script lines
  • Appending consistent closing tags or brackets to templated lines

Frequently asked questions

Q:Are empty lines affected?
By default, empty lines are skipped so you don't end up with lone semicolons or commas on blank lines. Toggle 'Skip empty lines' off if you need every single line to have the suffix — for example, when building fixed-width formats where all rows must be identical in structure.
Q:Can I add both a prefix and suffix at the same time?
This tool handles suffix only. Use it after the 'Add Prefix to Lines' tool to combine both operations, or use the 'Wrap Text in Quotes' tool for symmetric wrapping. You can also chain: run prefix first, copy the output, then paste into this tool for the suffix.
Q:What are the quick presets available?
Presets include ';' for SQL/JavaScript statement terminators, ',' for list and CSV preparation, '.md' and '.jpg' for appending file extensions to filename lists, and ' \' for multi-line shell command continuation. You can always type a custom suffix for anything not in the presets.
Q:How do I add a trailing comma to every line for JavaScript arrays?
Paste your list of values into the input, set the suffix to ',' and enable 'Skip empty lines'. This gives you a clean list of comma-terminated lines. Note: JavaScript allows trailing commas on the last element, so you can use this output directly inside an array literal without modification.
Q:Can I append multi-character suffixes like ' // end'?
Yes — the suffix field accepts any string of any length. Common multi-character examples: ' // end' to annotate closing code blocks, ' as const' for TypeScript const assertions, ' NOT NULL' for SQL column definitions, or ' | null' for TypeScript union types.
Q:How can I do this in the command line?
In Unix/Linux: `sed 's/$/SUFFIX/' input.txt`. In PowerShell: `Get-Content file.txt | ForEach-Object { $_ + 'SUFFIX' }`. In Python: `[f'{line}SUFFIX' for line in lines]`. This browser tool is the no-install alternative for fast, one-off text transformations.