Cara menghilangkan baris kosong
Aktifkan Hapus baris kosong untuk menghapus baris kosong. Aktifkan Perlakukan spasi-saja sebagai kosong untuk juga menghapus baris yang terlihat kosong tetapi berisi spasi atau tab.
Bergabunglah dan pisahkan garis
Gabung garis menggabungkan setiap baris dengan pemisah Anda (spasi, koma, atau khusus). Hapus jeda baris hingga rata menjadi spasi. Mode terpisah memecah teks menjadi kalimat, lebar tetap, atau pembatas khusus. Reflow menambahkan jeda baris lembut untuk paragraf yang mudah dibaca.
Urutkan dan balikkan garis
Urutkan A→Z atau Z→A berdasarkan abjad. Abaikan huruf besar/kecil saat menyortir camilan “Apple” dan “apel” secara bersamaan. Garis terbalik membalik dari atas ke bawah tanpa mengurutkan.
Hapus garis duplikat/pertahankan garis unik
Baris unik (pertahankan dulu) berarti "hapus duplikat" dan "simpan hanya baris unik". Pertama kali sebuah garis muncul tetap ada; salinan selanjutnya dihilangkan, dan ketertiban tetap terjaga.
Filter baris yang berisi teks
Hapus baris yang berisi tetes di setiap baris yang cocok dengan kata kunci Anda. Pertahankan baris yang berisi melakukan hal sebaliknya. Gunakan Peka huruf besar-kecil ketika huruf besar-kecil penting.
Alat terkait
Pembersih spasi ·
Pembersih karakter teks ·
Penghitung baris ·
Pengubah huruf ·
Pembersih URL
Line Tools pipeline
1 · Paste lines or wrapped text
2 · Remove blank & whitespace-only lines
3 · Filter keep / remove by keyword
4 · Dedupe (stable unique) · sort · reverse
5 · Join, split, or reflow paragraphs
6 · Copy processed output
Why line-level text tools matter
Lists are where copy-paste chaos peaks. A Word bullet list becomes plain lines without bullets. Meeting notes repeat the same action item three times. Server logs arrive as thousands of rows and you only need errors. CSV exports include blank rows that break imports. A paragraph copied from a PDF sits as one long line — or fifty short ones — and neither shape fits your editor.
WriteWithin Line Tools handles structure: blank lines, duplicates, sorting, filtering, joining, splitting, and reflowing. Everything runs in your browser with no upload. Pair it with the Whitespace Cleaner when spacing inside each line also needs fixing.
What Line Tools does
Blank lines vs whitespace-only blanks
A truly blank line contains no characters at all. A whitespace-only line looks empty but holds spaces or tabs — common after HTML paste or sloppy CSV export. Turn on Treat whitespace-only as blank to catch both kinds. Remove blank lines drops them; for collapsing runs of empty rows without deleting every gap, use the Whitespace Cleaner’s collapse blank lines option on intra-line spacing workflows.
Stable unique lines
Unique lines (keep first) removes duplicate rows while preserving the order of first appearances. Unlike sort-then-unique approaches that scramble your list, stable dedupe keeps “Alice” before “Bob” exactly as you pasted them. This is the fastest way to clean email lists, tag clouds, SKU exports, and chat action-item dumps before sharing.
Filter: keep or remove containing text
Remove lines containing drops every row that matches your keyword — like a mini grep in the browser. Keep lines containing does the opposite, which is ideal for pulling ERROR rows from a log. Toggle case sensitive when letter case matters (HTTP vs http). Leave filter text empty to skip this step entirely.
Sort, reverse, and order
Sort A→Z or Z→A alphabetically. Ignore case when sorting groups “Apple” and “apple” together. Reverse lines flips top to bottom without alphabetical sorting — useful when a chat export arrived newest-first and you want chronological reading order.
Join, split, and reflow
Join lines merges every row with your separator — space, comma, semicolon, or a custom string. Remove line breaks flattens to spaces for prose cleanup. Split modes break text into sentences, fixed character widths, or a custom delimiter. Reflow (add line breaks) wraps long paragraphs at a chosen width — the Prose preset uses 72 characters for readable email copy.
Processing order (fixed pipeline)
Line Tools applies options in a fixed sequence:
- Normalize line endings for internal processing
- Remove blank lines (optionally treating whitespace-only rows as blank)
- Filter lines by keep/remove keyword match
- Deduplicate with stable first-seen order
- Sort alphabetically or reverse line order
- Join lines, remove breaks, split, or add soft wraps
- Restore your chosen line-ending style (preserve, LF, or CRLF)
Because filter runs before dedupe, you can keep only ERROR lines and then remove duplicates among them in one pass.
Presets for common jobs
- Email paste — remove blank and whitespace-only lines
- List cleanup — dedupe, sort A→Z ignoring case, LF endings
- CSV prep — dedupe without sorting, LF endings
- Prose reflow — join hard breaks, then wrap at 72 characters
- Log filter — remove blanks, keep lines containing your keyword (case insensitive)
Presets are starting points. Add a filter keyword or switch sort direction after applying one.
Line Tools vs Whitespace Cleaner and Line Counter
The Whitespace Cleaner fixes spacing inside each line: double spaces, NBSP, zero-width characters, PDF mid-sentence joins, tab conversion. It can collapse or remove blank lines, but it does not dedupe, sort, filter by keyword, or reflow paragraph width. When both spacing and list structure are broken, run Whitespace Cleaner first, then Line Tools.
The Line Counter measures lines, words, and characters without changing text. Use it to verify poetry line limits, README length rules, or homework word counts after Line Tools shapes your content. It answers “how much?” — Line Tools answers “in what order and shape?”
For character-level cleanup — emoji, smart quotes, accents — use the Character Cleaner. For casing changes after sorting names, follow with the Case Converter.
Step-by-step: dedupe and sort a contact list
- Paste your list into the Line Tools input box.
- Enable Treat whitespace-only as blank and Remove blank lines.
- Turn on Unique lines (keep first) to drop duplicates.
- Choose Sort A→Z with Ignore case on for readable alphabetical order.
- Copy the output and paste into your spreadsheet or mail-merge tool.
Step-by-step: filter a log file
- Apply the Log preset or manually enable Remove blank lines and Treat whitespace-only as blank.
- Set Filter mode to Keep lines containing and enter ERROR (or your token).
- Leave case sensitivity off unless your log uses mixed-case level names.
- Optionally enable Unique lines if the same error repeats thousands of times.
- Copy the filtered rows into a ticket or summary email.
Common mistakes to avoid
- Deduplicating before filtering — the pipeline filters first, but if you run the tool twice manually, filter before dedupe in your workflow thinking too.
- Sorting when order matters — use stable unique without sort when sequence carries meaning (timeline, priority).
- Expecting space collapse here — double spaces inside a line need the Whitespace Cleaner.
- Joining CSV rows with commas blindly — if fields contain commas, fix structure in a spreadsheet; Line Tools joins whole lines, not columns.
- Using Line Counter to clean — counting tools never modify text; always process first, then measure.
Benefits of browser-based line processing
- Full suite in one place — sort, filter, join, and dedupe without hopping websites
- Stable unique preserves first-seen order unlike many online dedupe tools
- Whitespace-only blank detection catches lines other removers miss
- Private processing — lists of emails, client names, and internal SKUs never leave your device
- Composable with other WriteWithin text utilities in seconds
Real-world use cases
Newsletter and chat lists: dedupe before translating or mailing so recipients do not get the same reminder twice. Inventory and SKU exports: sort alphabetically, remove blanks, verify count in the Line Counter. PDF paragraphs: join broken lines with Remove line breaks, then reflow — or run Whitespace Cleaner PDF preset first for mid-sentence joins. Developer snippets: reverse stack traces, filter stack frames containing your package name, dedupe repeated warnings.
Teachers splitting reading passages by sentence, marketers shuffling hashtag lists for A/B caption tests, and researchers trimming bibliography dumps all share the same need: line-level control without opening a scripting environment. Line Tools fills that gap on machines where Python or shell access is blocked but the browser is always available.
Common questions
What is the difference between blank lines and whitespace-only lines? Blank lines have no characters. Whitespace-only lines contain spaces or tabs. Enable Treat whitespace-only as blank to remove both.
Do unique lines keep the original order? Yes. The first occurrence of each line stays; later copies drop. Order among unique lines is unchanged.
Is my text uploaded? No. Line Tools run entirely in your browser.
Can I count lines after processing? Yes. Paste the output into the Line Counter to confirm limits.
Should I clean spaces before or after line work? Whitespace Cleaner first when intra-line spacing is messy; Line Tools second for structure.