search
format_align_left
JSON Formatter CSS Formatter HTML Formatter JavaScript Formatter XML Formatter SQL Formatter Exception Formatter Markdown Preview & HTML to Markdown
data_object
JSON to Excel/CSV JSON to TypeScript, C#, Go, Java, Kotlin, Python & Dart JSON ⇄ YAML / TOML Converter JSON Diff – Compare Two JSON JSON Viewer & JSONPath Tester
table_chart
Excel/CSV to JSON Excel/CSV to SQL Excel/CSV to HTML
description
Compare text Text to Hex Text to Base64 Case Converter Regex Tester Vietnamese Accent Remover & Slug Generator Word Counter Line Tools: Remove Duplicates, Sort Lines Lorem Ipsum Generator
image
Convert Image Image to Base64 Converter Image Compressor Resize & Crop Image Favicon Generator Color Palette from Image EXIF Viewer & Remover
qr_code_2
QR Code Generator QR Code Scanner VietQR Bank Transfer QR Generator Wi-Fi QR Code Generator vCard QR Code Generator (Business Card) Barcode Generator (EAN-13, Code 128, Code 39)
lock
Convert Token Convert Hash Generate Password HMAC Generator (SHA-256, SHA-512) AES Encrypt / Decrypt Online Bcrypt Hash Generator & Checker
schedule
Convert datetime Timezone Info Vietnamese Lunar Calendar Converter Date Calculator Cron Expression Parser Countdown Timer
link
Encode and Decode URLs Shorten URL URL Parser & UTM Builder HTTP Header Checker
storage
Statistics Parser Statistics Compare SQL INSERT to JSON Converter SQL Table to C# / TypeScript / Java Class
travel_explore
Create Sitemap robots.txt Generator Meta Tag Generator Open Graph Preview
terminal
Number Base Converter UUID / ULID / NanoID Generator Chmod Calculator HTTP Status Codes
palette
Color Picker
help_outline
About UsPrivacy PolicyTerms of Service
THUTOOL
search

Line Tools: Remove Duplicates, Sort Lines

🔒 Processed 100% in your browser – your data never leaves your device
Options
0 input lines0 result lines

How to clean up and sort lines

  1. Paste a list with one item per line into Input.
  2. Tick the options you need. The result updates immediately and the counters show how many lines were removed.
  3. Copy the result, or click Use as input to apply another round of options.

Options are applied in this order: trim spaces → remove empty lines → remove duplicates → sort → reverse → shuffle → prefix/suffix → numbering.

Example

Input banana, Apple, apple, cherry (one per line) with Remove duplicate lines, Ignore case and A → Z gives Apple, banana, cherry. Add the prefix ' and suffix ', to turn the list into SQL values.

FAQ

Which line is kept when there are duplicates?
The first one, with its original spelling. Later copies are removed.

What does natural sort do?
It compares numbers by value, so file2 comes before file10. Normal A → Z sorting would put file10 first.

Does sorting handle Vietnamese?
Yes, sorting uses your browser's language rules, so Đà Nẵng comes after Cần Thơ.

Related tools

  • Compare textCompare two texts line by line and highlight every difference instantly. Free online diff tool that runs 100% in your browser.
  • Text to HexConvert text to hex, binary, ASCII and decimal, or decode hex and binary back to UTF-8 text. Free, instant and processed in your browser.
  • Text to Base64Encode text to Base64 or decode Base64 to text with full UTF-8 support, including URL-safe Base64. Free and processed in your browser.
  • Case ConverterFree case converter: UPPER, lower, Title, Sentence, camelCase, PascalCase, snake_case, kebab-case and more, all at once. Runs in your browser.
  • Regex TesterFree online regex tester: highlight matches, inspect capture and named groups, preview replace, see syntax errors. JavaScript regex, runs in your browser.
  • Vietnamese Accent Remover & Slug GeneratorFree tool to remove Vietnamese accents and generate SEO-friendly URL slugs, line by line in bulk. Choose - or _ and max length. Runs in your browser.
@Made by THUTOOL