List Item Prefix Adder

Splits a list on a configurable separator (newline, comma, or a custom delimiter), prepends a chosen prefix string to every item, and rejoins it. Unlike the string category's newline-only Line Prefix Adder, this tool works on comma- or custom-delimited lists too. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-27

Overview

Introduction

Adding the same label, marker, or code prefix to every line of a list by hand is tedious and error-prone once the list gets past a handful of items.

This tool prepends a chosen text string to every item of a list in one pass, with a configurable separator so it works whether your list is one-per-line, comma-separated, or delimited some other way.

What Is List Item Prefix Adder?

A bulk text tool that splits input into items on a chosen separator, prepends a fixed prefix string to each one, and rejoins the result.

It generalizes the string category's Line Prefix Adder by adding separator choice, since not every list arrives newline-separated.

How List Item Prefix Adder Works

The input is split into items using the selected separator (newline, comma, or a custom delimiter you type in).

Each item has the prefix string prepended verbatim, then the items are rejoined using the same separator you split on.

When To Use List Item Prefix Adder

Use it to add a common tag, bullet marker, namespace, or file-path prefix to a batch of items before pasting them elsewhere.

It's handy for turning a plain list of names into CLI flags (like prefixing every line with `--tag=`) or SQL values (prefixing with a table alias).

Features

Advantages

  • Works on newline-, comma-, or custom-delimited lists, not just newline-separated ones.
  • Preserves item order and count exactly, including blank items between repeated separators.
  • One-pass, deterministic transform with no hidden trimming or filtering of your data.

Limitations

  • Prepends the exact same prefix to every item; it doesn't support per-item or conditional prefixes.
  • Doesn't trim whitespace around items before prefixing, so a stray leading space before an item stays between the prefix and the item's text.

Examples

Prefixing a newline list with a bullet

Input

apples
bananas
cherries

Output

- apples
- bananas
- cherries

Separator is newline; the prefix "- " is prepended to each of the three items.

Prefixing a comma-separated list

Input

red,green,blue

Output

#red, #green, #blue

Separator is comma; the list is split on ", ", each item gets "#" prepended, then rejoined with ", ".

Best Practices & Notes

Best Practices

  • Match the separator setting to how your list is actually delimited, otherwise items will be split incorrectly before prefixing.
  • Use List Separator Normalizer first if your source list mixes multiple separator styles inconsistently.

Developer Notes

Implemented with the shared `splitListItems`/`joinListItems` helpers, which split on the resolved delimiter via `String.prototype.split()` and rejoin with `Array.prototype.join()`, so behavior stays consistent across every tool in this category.

List Item Prefix Adder Use Cases

  • Adding a `--flag=` prefix to a list of CLI argument values
  • Prefixing a list of filenames with a shared directory path
  • Turning a plain word list into Markdown bullet points before pasting into a doc

Common Mistakes

  • Choosing "Newline" as the separator for a comma-separated single-line list, which treats the whole line as one item and only prefixes it once.
  • Forgetting that a custom separator field left blank silently falls back to newline splitting.

Tips

  • Pair with List Item Suffix Adder to wrap items on both sides in one workflow.
  • Use List Separator Changer afterward if you need the output delimited differently than the input.

References

Frequently Asked Questions