List converter

Clean, sort, and wrap list items

Paste input, tune options, and copy the result — all in your browser

Last updated: January 27, 2026
Frank Zhao - Creator
CreatorFrank Zhao
Separator
Wrap item
Wrap list
The transformed output will appear here

Introduction / overview

The List converter takes one item per line (your input) and produces a single formatted output string. It is designed for the practical tasks people do every day: dedupe a list, sort it, add wrappers, and copy the result.

Who is this for?

  • Developers cleaning up CSV-like inputs, environment lists, or copy-pasted columns.
  • Writers and ops folks formatting bullet lists, tags, or product SKUs.
  • Anyone who wants consistent formatting without manual edits.

The tool runs locally in your browser. Your data stays on your device.

If you are doing text cleanup more broadly, pairing this with the Case Converter can help you standardize capitalization, and the JSON to YAML converter is handy when your "list" is actually configuration data.

How to use / quick start

  1. 1Paste your list into Your input data, one item per line.
  2. 2Toggle options like Trim, Remove duplicates, or Lowercase.
  3. 3Set a Separator (for example ,  ,\; or " | "\text{" | "}).
  4. 4Use Wrap item and Wrap list to add prefixes/suffixes (useful for HTML, Markdown, SQL).
  5. 5Copy the output using the copy button on the right side of Your transformed data.

Sharing tip

Use the Share button if you want to send someone the same configuration. For large inputs, sharing may omit the raw list to keep the URL short.

Step-by-step examples

1

Dedupe + join with a comma

Input two lines with duplicates, keep trimming and deduping on, set Separator to a comma and space.

"anbnb"\text{"a\\nb\\nb"}\to"a, b"\text{"a, b"}

This is great for converting a pasted column into a single line you can use in a search query, config value, or message.

2

Wrap each item for HTML

Turn lines into a list of <li> items and wrap the whole output. Enable Keep line breaks so the output is readable.

"applenbanana"\text{"apple\\nbanana"}\to"<ul>"\text{"<ul>"}+\,+\,"<li>apple</li>"\text{"<li>apple</li>"}+\,+\,"<li>banana</li>"\text{"<li>banana</li>"}+\,+\,"</ul>"\text{"</ul>"}

If you need to adjust capitalization first, run your values through the Case Converter and then paste the cleaned list here.

Output=ListPrefix+Join(Items, Separator)+ListSuffix\text{Output} = \text{ListPrefix} + \text{Join}(\text{Items},\ \text{Separator}) + \text{ListSuffix}

Conceptually: split into lines, transform each item, then join.

Real-world examples / use cases

Cleaning a pasted column

Background: You copied a spreadsheet column with duplicates and extra spaces.

Inputs: trim on, dedupe on, separator ", "\text{",\ "}.

Result: a single clean line you can paste into docs or a message.

Making stable, sorted outputs

Background: You need deterministic output for a config review or checklist.

Inputs: sort ascending, trim on, keep line breaks on.

Result: a clean list that is easy to diff.

Generating HTML or Markdown fragments

Background: You have plain text items, but you need <li> tags or Markdown links.

Inputs: wrap item prefix/suffix, optionally wrap list.

Result: copy/paste-ready markup.

Building an allowlist block

Background: You want to turn one-per-line items into a comma-separated allowlist.

Inputs: trim on, dedupe on, lowercase optional.

Result: a compact format you can paste into settings.

For identifiers and tokens, you may also like UUIDs Generator and ULID Generator.

Common scenarios / when to use

Dedupe a list

Remove repeated lines while keeping the first occurrence.

Sort for stability

Make outputs deterministic for reviews and diffs.

Wrap for markup

Generate HTML/Markdown snippets from plain values.

Trim stray spaces

Fix inconsistent copy/paste with leading/trailing spaces.

Copy-ready output

Turn a column into a single line you can paste elsewhere.

When not to use

If items contain newlines inside a single item, this tool treats them as separate items.

Tips & best practices

Keep line breaks for readability

If you are generating code blocks or markup, enabling Keep line breaks makes the output easier to review before you paste it.

Avoid accidental sorting

If order matters (for example, priority lists), leave sorting off and only trim/dedupe.

Use wrappers to build templates

Wrap item and Wrap list are a lightweight templating trick. You can produce snippets for HTML, SQL, Markdown, and more.

Calculation method / formula explanation

The converter follows a consistent pipeline. Conceptually, it turns your input string into an array of lines, applies selected transformations, then joins the list back into a single output.

Pipeline (high level)

input\text{input}\tosplit by n\text{split by }\\n\totransform each item\text{transform each item}\tojoin with separator\text{join with separator}

Note: options are applied in a specific order so results are predictable.

Key variables

  • Separator\text{Separator}: the string inserted between items.
  • ItemPrefix\text{ItemPrefix} and ItemSuffix\text{ItemSuffix}: added around each item.
  • ListPrefix\text{ListPrefix} and ListSuffix\text{ListSuffix}: added around the final joined string.

Related concepts / background info

One item per line is a common interchange format

Many apps and spreadsheets export a column as newline-separated text. The List converter treats each line as one item. If your data uses commas or tabs, you may need to pre-format it before pasting.

For more structured transformations, you may prefer dedicated converters such as YAML to JSON or JSON to YAML.

Frequently asked questions (FAQs)

Why did my output lose line breaks?

By default, the tool joins items into a single line. Enable Keep line breaks if you want the output to stay multi-line.

Does “Remove duplicates” keep the original order?

Yes. Dedupe removes repeated lines while keeping the first time each value appears.

What does “Sort alphabetically” do?

It sorts your items as strings (A→Z or Z→A). If order has meaning (priorities, ranking), leave sorting off.

Can I generate a JSON array?

You can approximate it by setting ItemPrefix=""¨\text{ItemPrefix} = \text{"\""} andItemSuffix=",¨"\text{ItemSuffix} = \text{"\","}, then wrapping the list. For true JSON validation, use a dedicated converter like YAML to JSON.

Is my data uploaded to a server?

No. The conversion runs locally in your browser.

Limitations / disclaimers

Input assumptions

This tool treats each newline as a separate item. If your data includes multi-line values, you will need a different format.

The output is plain text. If you generate snippets for code or markup, review them before using them in production.

External references / sources

This tool implements straightforward text transformation patterns (split, map, filter, join). For background reading on list processing and string handling:

List converter | CalculatorVast