Hongmu Notes

🗑️ Array deduplication

Paste a set of data, remove duplicates with one click, and retain the order of first occurrence.

Array deduplication

Paste the list into the input box below (separated by spaces, tabs, or newlines), and click "Remove Duplicates" to get the result with duplicates removed.

Instructions for use

  • Spaces, tabs, and newlines are all delimiters, and they can also be used directly when copying an entire column from a table.
  • The results retain the order of first occurrence and are case-sensitive. A and a are treated as two items.
  • The result box is read-only. Click "Copy Results" to remove it. You can also press and hold on your mobile phone to select all and copy them.

What can this tool do?

  • Paste a space or newline separated list and remove duplicates with one click
  • The order of first appearance is retained, and the results correspond one-to-one with the original list for easy checking.
  • Consecutive spaces, tabs, and blank lines are not treated as valid items, and the results are clean.
  • Case sensitivity: A and a are considered two different contents

Separation methods and result examples

inputresultDescription
1 2 3 1 2 31 2 3Page default example, the order remains unchanged
a b a c ba b cKeep the first occurrence of
苹果 香蕉 苹果苹果 香蕉The same applies to Chinese projects
A aA aDifferent cases are treated as two items
a↵b↵a(多行)a bNewlines also serve as delimiters

Usage tips

  • Click "Remove Duplicates" and the results will appear in the read-only result box below.
  • "Clear input" and "Clear results" only clear one box each, making it easier to compare before and after.
  • Everything is processed locally in the browser, and the input content is not uploaded to the server.

All keywords and tutorials 12

❓ FAQ

Will the order change after deduplication?
Won't. The tool retains items in the order of their first appearance, and discards duplicate items directly. Therefore, there is only one copy of each item in the result, and the order is consistent with the original list, making it easier to check item by item.
Can I paste it separated by line breaks?
Yes. Spaces, tabs, and newlines are all delimiters. You can copy an entire column of data from the table and paste it directly; multiple consecutive spaces or empty lines will not produce empty items.
Does it count as a duplicate if the case is different?
Count as two different items. The tool accurately compares by character, and A and a will each retain a copy; when you need to ignore case, please use the uppercase and lowercase conversion tool to unify them into the same writing method and then eliminate duplicates.
How to copy the result?
Click "Copy Results" to write to the clipboard; if the browser restricts clipboard permissions, long-press the result box to select all and copy the results to the same effect. The result box is read-only to avoid misalignment with the input.