Remove characters from lines

Remove the first or last N characters from every line, or everything before or after a character. Emoji and accents stay intact.

Your text is processed in your browser and never sent to our server.

0 characters · 0 words · 0 lines

How to remove the first or last characters from each line

This tool cuts characters from every line at once: a fixed number from the start or end, or everything before or after a character such as :, - or |.

  1. Paste your text into the input box (or open a .txt file).
  2. Set Remove first and/or Remove last to the number of characters you want gone. Use 0 to leave that side alone.
  3. To cut at a character instead, choose before the marker or after the marker and type the marker.
  4. Copy or download the result.

What the options do

  • Remove first / last N characters counts real characters, so an emoji, a flag or a letter with a diacritic such as "á" counts as one and is never cut in half. Lines shorter than N become empty.
  • Remove text before / after the marker deletes everything on the chosen side of the marker. Lines that do not contain the marker are left unchanged. The marker cut is applied first, then the first/last N characters.
  • First / last occurrence decides which marker counts when a line contains it more than once, e.g. the last / in a file path.
  • Keep the marker leaves the marker itself in the result.
  • Trim spaces first removes leading and trailing spaces before counting, so invisible spaces do not eat your N.

Examples

Remove the first 3 characters (strip list numbering):

1. Ján Novák     →   Ján Novák
2. Noël Dupont   →   Noël Dupont

Remove everything before a character (marker - , before the marker):

#A100 - Red shirt    →   Red shirt
#B200 - Blue jeans   →   Blue jeans

Remove everything after the last slash (marker /, after, last occurrence, keep marker):

/photos/2026/img.jpg   →   /photos/2026/

Frequently asked questions

How do I remove the first character from each line?

Paste your lines and set Remove first to 1 (it is the default). The result is ready to copy immediately.

How do I remove the first N characters in Excel or Google Sheets?

Use =MID(A1, N+1, LEN(A1)) or =RIGHT(A1, LEN(A1)-N) to drop the first N characters, and =LEFT(A1, LEN(A1)-N) to drop the last N. These formulas count UTF-16 units, so emoji may break; this tool counts whole characters.

How do I delete everything after a specific character?

Choose after the marker and type the character. For example, marker @ turns e-mail addresses into user names. To extract e-mails first, use the email extractor.

Is my data safe?

Yes. The text is processed locally in your browser and never sent to our server.

Can I remove spaces or whole lines instead?

For spaces use the spaces remover and for blank lines the empty lines remover.