PDFPowerHub

Sort Text Lines

beta

Paste lines and reorder them instantly — ascending, descending, or reversed. Sort case-insensitively, use natural order so item2 comes before item10, or sort by the key (the text before the first = or :) so KEY=value lines line up for a clean side-by-side compare of env files, k8s secrets and Vault output. You can also dedupe, trim each line, drop blank lines and strip stray characters. It all runs in your browser, so sensitive values are never uploaded.

Reorder lines of text — ascending, descending or reversed — with options for case, natural (numeric) order, and sorting by the key before = or : (handy for env vars and k8s/Vault secrets). Everything runs in your browser; nothing is uploaded.

Options
Lines
Sorted · 0 lines

How to use Sort Text Lines

  1. 1 Paste your lines into the Lines box (one entry per line).
  2. 2 Choose the order: A→Z, Z→A, or Reverse (flip without sorting).
  3. 3 Turn on options as needed — ignore case, natural order, sort by key (before = or :), remove duplicates, trim lines, drop blanks, or trim specific characters.
  4. 4 Copy the sorted result or download it as a .txt file.

Frequently asked questions

Is my text uploaded?

No. All sorting happens in your browser with JavaScript. Your lines never leave your device, so it is safe for env vars, k8s secrets and other sensitive values.

Can I sort env vars or secrets by their key?

Yes. Turn on “Sort by key” to order by the text before the first = or :, so KEY=value and KEY: value lines are ordered by KEY. Sort both files the same way and they line up for a line-by-line diff.

What is natural order?

Natural (numeric) order sorts embedded numbers by value, so item2 comes before item10 instead of the plain alphabetical item10 before item2.

Can it remove duplicates and blank lines?

Yes. Toggle “Remove duplicate lines”, “Remove blank lines” and “Trim each line”, and use “Trim characters” to strip stray quotes or commas from the ends of each line.