← Back to Text & Writing Tools

Add Suffix to Each Line

Put the same text at the end of every line — commas for a list, semicolons for statements, or a closing tag.

Checking tool availability…

Add Suffix to Each Line works on your text locally in your browser.

End every line the same way

Lists often need something after each item before they can be pasted into code, a query, a spreadsheet formula, or a web page: a comma, a semicolon, a closing quote, a unit, or an HTML line break. Enter the lines and a suffix and it is appended to the end of every line at once, while blank lines are left alone by default.

How to add a suffix to every line

  1. Type or paste your lines, or choose Upload Document to open a .txt, .md, .docx, or .pdf file.
  2. Enter the suffix, including a leading space if you want a gap before it. Turn on the blank-lines option if empty lines should get it too.
  3. Choose Copy Result, or Replace Input with Result to keep working here — Undo Replace brings the original back.

Where the suffix goes

  • The suffix is added after the last character of each line, before its line break.
  • Invisible spaces or tabs at the end of a line count as its last characters, so the suffix lands after them — trim them first with Remove Extra Spaces if that matters.
  • Empty lines and lines containing only spaces are skipped unless you include them.
  • Every other line gets the suffix, including the last one, and line order and Windows line breaks are kept.
Add Suffix to Each Line examples
LinesSuffixResult
apple banana cherry“,”apple, banana, cherry,
DROP TABLE temp_a DROP TABLE temp_b“;”DROP TABLE temp_a; DROP TABLE temp_b;
Line one Line two“<br>”Line one<br> Line two<br>

Your text stays on your device

  • The suffix is added by JavaScript running in your browser.
  • Your text is never uploaded to Looty Tools or any other server.
  • Uploaded documents are opened and read in your browser; the file itself is never sent to Looty Tools.
  • Nothing is stored — refreshing or closing the page clears the text and the suffix.

Limitations

  • Uploads accept .txt and .md files up to 5 MB, Word .docx files up to 15 MB, and PDFs up to 25 MB and 50 pages. Older .doc files are not supported, and scanned or image-only PDFs have no text to use.
  • There is no option to leave out the last line, so remove a final comma by hand when building a comma-separated list.
  • The suffix box is a single line, so a suffix cannot contain a line break.
  • If your text mixes Windows and Mac/Linux line breaks, the result uses one style throughout — Windows breaks if any were present.

Related text tools

Add Suffix to Each Line FAQ

Why is there a gap before my suffix on some lines?
Those lines end with spaces or tabs you cannot see. The suffix goes after everything already on the line, including those spaces. Run the text through Remove Extra Spaces first to trim them.
What happens to blank lines?
By default they are left empty, so gaps between groups do not turn into lines with only a comma. Turn on “Also add the suffix to blank lines” to change every line.
Can it skip the last line, for a list of values?
No. Every non-blank line gets the suffix, including the last one. If you are building a comma-separated list, delete the final comma by hand.
How do I wrap each line in quotes?
Add a quote mark with Add Prefix to Each Line, then add a quote mark (plus a comma if you need one) here. Each tool works on the result of the other.
Are Windows line breaks kept?
Yes. The suffix is added before each line break, and text with Windows line breaks keeps them, so the result pastes back cleanly into the program it came from.
Can I upload a Word document or PDF instead of pasting?
Yes. Upload Document accepts .txt, .md, Word .docx, and text-based .pdf files, or you can drop a file onto the text box. The file is read in your browser — it is not sent to Looty Tools — and its text replaces whatever is in the box. Scanned PDFs without a text layer and older .doc files are not supported.
Is my text uploaded?
No. The suffix is added in your browser; your text is never sent to Looty Tools or saved.

More from Looty

Explore Looty’s Ecosystem

Discover more ways Looty can help you learn, organize, create, and make an impact.