CruxDevCruxDev Tools Prompts
text Utility • Zero-Server Privacy • 100% Client-Side

List Converter & Sorter

Sort, deduplicate, prefix/suffix, number, reverse, shuffle, and change delimiters on multi-line lists — one-click transformations.

Overview

A one-screen workbench for line-based lists: sort ascending or descending, remove duplicates, reverse, shuffle, number each line, join with commas, or export the whole list as formatted JSON. Paste one item per line, click an operation, click the output to copy.

How It Works

Paste your list into the input area, one entry per line; empty lines are dropped automatically. Click any of the eight operation buttons — Sort A-Z, Sort Z-A, Dedupe, Reverse, Shuffle, Number, Join (,) or JSON — and the output panel shows the result for the same input, so switching operations is instant. Click anywhere in the output to copy it. Number prefixes each line with its one-based position and a period; JSON emits a pretty-printed array.

Step-by-Step Usage Guide

  1. Paste your list, one item per line; blank lines are discarded.
  2. Click an operation button to transform the list.
  3. Re-click with a different operation to compare results on the same input.
  4. Click the output panel to copy the transformed list.

Technical Specifications & Standards

Each operation has a defined, slightly opinionated behaviour. Sorting uses JavaScript's default string comparison, which is by UTF-16 code units: all uppercase letters sort before lowercase, so 'Zebra' precedes 'apple', and '10' precedes '9' because comparison is textual, not numeric — sort in a spreadsheet afterwards if numeric order matters. Dedupe uses a Set and is exact-match and case-sensitive; 'Apple' and 'apple' are distinct here, unlike the site's duplicate-remover tool which is case-insensitive by default — pick the tool that matches your data. Shuffle is a Fisher-Yates implementation, the unbiased standard: it walks the array from the end, swapping each element with a uniformly chosen earlier-or-equal index. Number emits '1. item' lines suitable for pasting into Markdown ordered lists. Join produces a single comma-space line, and JSON serialises with two-space indentation, so the output is a drop-in array literal for code.

Targeted Use Cases

  • Sorting a jumbled list of names, tags, URLs or dependencies into a predictable order.
  • Preparing an array literal for code or a config file with the JSON operation.
  • Randomising a list of participants, prompts or quiz questions with an unbiased shuffle.
  • Turning a line-per-item list into a comma-separated single line for a form field or tag input.

Notes & Gotchas

  • Check capitalisation before sorting: the sort is code-point order, so capitals cluster before lowercase entries.
  • Use the site's Duplicate Line Remover if you need case-insensitive dedupe; this tool's dedupe is exact-match.
  • Re-run Shuffle for a new random order — each click reshuffles the current input, not the previous output.
  • Keep one item per line; embedded line breaks cannot survive the line-based processing.

Frequently Asked Questions

Why does my sort put capitals first and 10 before 9?

Sorting compares strings by character code, not by locale or number. Uppercase letters have lower code points than lowercase, and textual comparison reads 10 before 9. Convert to consistent case, or sort numerically elsewhere, when that matters.

Does dedupe ignore case and extra spaces?

No — dedupe is exact: 'Apple' and 'apple' are different, as are trailing spaces. For case-insensitive, whitespace-trimming deduplication use the Duplicate Line Remover tool, which is built for that.

Is the shuffle fair?

Yes, it is a Fisher-Yates shuffle, which gives every permutation an equal chance — unlike naive approaches that sort by a random key or swap with any index, which bias the result.

What does the JSON output look like?

A pretty-printed JSON array of the list items with two-space indentation, ready to paste into code, a config file, or an API request body.