Free online text tool

Remove Last Characters Of Each Line

Remove Last Characters Of Each Line deletes the number of characters you choose from the end of every line. Paste your text, enter a number and copy the result. It is free and runs in your browser.

Remove Last Character of Each Line Tool

0Character Count
0Character Count (without spaces)
0Word Count
0Sentence Count
0Paragraph Count
0Line Count

Character Removal Example

Before
If I don’t like something, I’ll stay away from it.
After (remove 8)
If I don’t like something, I’ll stay away 

Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.

Suggest a New ToolProvide Feedback on This Tool

What does Remove Last Characters Of Each Line do?

This tool deletes the last characters of every line. You choose the number, and each line loses that many characters from its end. The rest of the line is not changed.

A line that is shorter than the number becomes an empty line, so your line count stays the same. Empty lines stay empty. Spaces and punctuation count as characters.

Use it to remove trailing commas, semicolons or periods from every row, to drop a fixed ending or suffix, or to clean up pasted lists.

Remove last characters of each line examples

Each example shows the number used. Spaces count as characters.

SettingBeforeAfter
Remove 8
If I don’t like something, I’ll stay away from it.
If I don’t like something, I’ll stay away 
Remove 1
apple
banana
appl
banan
Remove 4 (spaces count)
a b c d e
a b c
Remove 5 (a short line becomes empty)
Greetings
Hi
abcdefg
Gree

ab
Remove 3 (empty line stays)
Hello there

Ok there
Hello th

Ok th
Remove 2 (emoji and accents)
ab😀😀
xyéè
ab
xy

How to remove the last characters of each line

  1. 1
    Add your text
    Type or paste your lines into the box, or import a text file.
  2. 2
    Enter the number
    Type how many characters to remove at the end of each line.
  3. 3
    Click Remove Last Characters
    Every line loses that many characters at once. Use Undo if you change your mind.
  4. 4
    Copy it
    Click Copy and paste the result where you need it.

When to remove the last characters

Good for

Removing trailing commas, semicolons or periods from each row, dropping a fixed ending or suffix, and cleaning up pasted lists.

Check first

Characters are counted from the end of each line, spaces included, so a space in front of the removed part stays at the end of the line. Lines shorter than the number become empty lines. Use Undo right after if the result is not what you wanted.

Other tools

To remove characters from the start of each line, try Remove First Characters Of Each Line. To keep only the end instead, try Keep Last Characters Of Each Line. To delete the last word, try Delete Last Word Of Every Line.

Remove last characters of each line FAQ

What does the Remove Last Characters Of Each Line tool do?

It deletes the last characters of every line. If you enter 2, the last 2 characters are removed from the end of each line and the rest of the line stays.

How do I remove the last character of each line?

Type or paste your text, enter 1 as the number of characters and click Remove Last Characters. The result replaces the text in the box. Click Copy to use it, or Undo to go back.

How do I remove the last 3 characters?

Enter 3 as the number. Every line loses its last 3 characters at once.

What if a line is shorter than the number?

The whole line is removed and it becomes an empty line, so your line count stays the same. Use Remove Empty Lines afterwards if you want those lines gone.

Are spaces counted as characters?

Yes. Spaces, punctuation and digits all count as characters. If a line ends with a space, that space counts as the last character, and a space left in front of the removed part stays at the end of the line.

Does it work on each line separately?

Yes. Every line is cut on its own, counting from the end of that line. Empty lines stay empty.

What number can I enter?

Any whole number from 1 upwards. If you enter 0, a negative number or a decimal, the tool asks for a valid number and does not change your text.

Does it count emoji and accented letters correctly?

Yes. Each visible character counts as one, so an emoji or a letter with an accent is not cut in half.

Is this tool free and is my text private?

Yes. It is free, needs no account and runs in your browser, so your text is not uploaded to a server.

Looking for more text tools?

Browse Remove Tools

Last updated: 11 November 2026