Text Line Tools

行の並べ替え、重複削除、反転、トリム。
0 lines, 0 unique

8 Operations

Sort, reverse, deduplicate, trim, shuffle, number, remove empty.

One Click

Apply any operation instantly.

Copy Result

One-click copy to clipboard.

Client-side

All processing in your browser. No data uploaded.

Text Line Toolsについて

Working with lists of text lines is a common task in data processing, scripting, and content management. Whether you have a list of names exported from a spreadsheet, a set of URLs scraped from a page, lines of code to reorder, or a collection of tags to clean up, the Text Lines tool gives you eight powerful operations in a single interface. Sort A to Z or Z to A to alphabetise lists. Reverse the order to flip the sequence. Remove Duplicates eliminates repeated lines, keeping only the first occurrence — ideal for deduplicating email lists or keyword sets. Remove Empty Lines cleans up lists with blank entries. Trim Lines strips leading and trailing whitespace from every line, useful after copying text from tables or code editors. Shuffle randomises the order for things like random team assignments or lottery draws. Add Numbers prepends a sequential number to each line, turning any list into a numbered list. All operations are non-destructive — the textarea is your workspace, and you can undo any change with Ctrl+Z.

Text Line Toolsの使い方

  1. Paste your list of items into the text area, with one item per line.
  2. Review the line and unique-line counts shown above the textarea.
  3. Click any of the eight operation buttons to transform the list instantly.
  4. Continue applying more operations as needed — for example, first "Remove Empty" then "Sort A→Z".
  5. Click "Copy" to copy the processed list to your clipboard.
  6. Use Ctrl+Z (Cmd+Z) to undo an operation if needed.

よくある質問

How does Remove Duplicates work?

It uses a JavaScript Set to identify unique lines, preserving the first occurrence of each line and discarding subsequent duplicates. The comparison is case-sensitive, so "Apple" and "apple" are treated as different lines.

Does Sort handle numbers correctly?

The sort uses locale-aware string comparison (localeCompare), which means numeric strings are sorted as text (e.g., "10" comes before "2"). For pure numeric sort, convert each number to a separate line and the locale sort will typically handle common cases correctly.

What does Trim Lines do?

Trim Lines removes whitespace (spaces, tabs) from the beginning and end of each line. It does not affect whitespace inside a line. This is useful when lines have been copied from a table or code editor with extra indentation.

Can I chain multiple operations?

Yes. Each button applies its operation to the current content of the textarea, so you can chain operations in sequence. For example, paste a list, click "Remove Empty", then "Remove Duplicates", then "Sort A→Z" to produce a clean, sorted, unique list.

Is there an undo feature?

Because the textarea is a standard HTML element, your browser's native undo (Ctrl+Z on Windows/Linux, Cmd+Z on Mac) works to reverse the last operation applied.

関連ツール

Text DiffWord CounterCase ConverterURL Slug Generator
Free Ebook
Top 10 Free Tools Every Developer Needs

Top 10 Free Tools Every Developer Needs

Boost your productivity instantly. Get our exclusive cheatsheet featuring the most essential web utilities you didn't know you needed, delivered straight to your inbox.

We respect your inbox. Unsubscribe at any time.