Pangkas Baris|Opsi
Prefiks untuk dihapus
Sufiks untuk dihapus
Masukan
e.g. "apple", "banana", "cherry",
Keluaran
e.g. apple banana cherry

Trim Lines Online — Remove Prefix & Suffix from Every Line

Need to strip quotes, bullets, numbering, or other characters from the start and end of every line? This free tool removes any prefix and suffix from each line of your text instantly. Perfect for cleaning up JSON array entries, CSV data, numbered lists, and more.

Cara Menggunakan Alat Ini

  1. Paste your linesCopy your text with unwanted prefixes or suffixes and paste it into the input panel.
  2. Set prefix and suffixEnter the prefix to remove (e.g. ") and the suffix to remove (e.g. ",) in the options bar.
  3. Enable trim whitespaceOptionally enable "Trim whitespace first" to strip leading and trailing spaces before removing prefix and suffix.
  4. Copy the resultYour cleaned lines appear instantly in the output panel. Click Copy to copy them to your clipboard.
  5. Chain with other toolsWith Auto-fill enabled, your output automatically carries over when you open another tool from the sidebar. Use the back and forward arrows to undo navigation and restore your previous tool state including all options.

Fitur

Prefix Removal

Remove any text from the beginning of every line. Strips the prefix only if the line starts with it.

Suffix Removal

Remove any text from the end of every line. Strips the suffix only if the line ends with it.

Optional Whitespace Trim

Trim leading and trailing whitespace from each line before checking for prefix and suffix matches.

Real-Time Preview

See results update instantly as you type. No buttons to click, no delay.

JSON Cleanup

Strip quotes and commas from JSON array entries pasted as text lines.

Complete Privacy

All processing runs in your browser. Your text never leaves your device.

Auto-fill Pipeline

Enable Auto-fill to carry your output to the next tool. Navigate back and forward with full state restoration — input, output, and all settings are preserved.

Kasus Penggunaan Nyata

1

Remove quotes and commas from JSON array entries

Given a JSON array like ["apple", "banana", "cherry"], trim the quotes and commas to get a clean list of values for a spreadsheet.

2

Strip bullet prefixes from markdown lists

Remove leading "- " or "* " from markdown list items to get plain text entries, ready for use in another format.

Pertanyaan yang Sering Diajukan

What does Trim Lines do?
It removes a specified prefix from the start and a specified suffix from the end of every line in your text. This is useful for cleaning up lists, JSON entries, and other structured data.
Does it remove the prefix/suffix from every line?
It only removes the prefix if a line actually starts with it, and only removes the suffix if a line actually ends with it. Lines that do not match are left unchanged.
Can I use it to clean JSON array entries?
Yes! If you paste lines like "apple", you can set prefix to " and suffix to ", to get clean values like apple.
What does "Trim whitespace first" do?
When enabled, each line is trimmed of leading and trailing spaces before the prefix and suffix are checked and removed. This helps when lines have inconsistent indentation.
Is my text stored anywhere?
No. All processing happens in your browser. Your text is never sent to any server.
Can I remove numbered prefixes like "1. " from every line?
You can remove a fixed prefix like "- " or "* ", but since numbered prefixes differ on each line (1., 2., 3...), you would need a regex tool for that. This tool removes the same prefix from every line.

Alat Terkait

Semua pemrosesan teks terjadi langsung di browser Anda. Teks Anda tidak pernah dikirim ke server mana pun, disimpan, atau dibagikan kepada pihak ketiga. Alat ini sepenuhnya pribadi dan aman.