Keep Last Characters Of Each Line

Free online text tool

Keep Last Characters Of Each Line

Keep Last Characters Of Each Line cuts every line down to the number of characters you choose. Paste your text, enter a number and copy the result. It is free and runs in your browser.

Keep the Last Characters Tool

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

Keep the Last Few Characters Example

Before (keep 14)
They looked up at the sky and saw a million stars.
They looked up at the sky and saw a million stars.
After
million stars.
million stars.

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

Suggest a New ToolProvide Feedback on This Tool

What does Keep Last Characters Of Each Line do?

This tool keeps the last characters of every line and removes the rest. You choose the number, and each line is cut to that many characters counted from its end.

Lines that are already shorter than the number are left alone, and empty lines stay empty. Spaces and punctuation count as characters, and the characters you keep are not changed.

Use it to take a file extension, a year, a suffix or an ID number from the end of each line.

Keep last characters of each line examples

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

SettingBeforeAfter
Keep 14
They looked up at the sky and saw a million stars.
million stars.
Keep 3
Hello world
rld
Keep 5 (short line)
Hi
Hi
Keep 4 (spaces count)
a b c d e
 d e
Keep 1
apple
banana
e
a
Keep 10 (empty line stays)
Hello there friend

Ok
ere friend

Ok

How to keep 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 keep from the end of each line.
  3. 3
    Click Keep Last Characters
    Every line is cut to its last 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 keep the last characters

Good for

Taking the end of each line, such as a file extension, a year, a postcode or an order number, from a long list.

Check first

Characters are counted from the end of each line, spaces included, so a number that starts in the middle of a word cuts the word. Use Undo right after if the result is not what you wanted.

Other tools

To keep the start of each line, try Keep First Characters Of Each Line. To delete the end instead, try Remove Last Characters Of Each Line.

Keep last characters of each line FAQ

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

It keeps only the last characters of every line and removes the rest. If you enter 14, each line is cut to its last 14 characters.

How do I keep the last characters of each line?

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

What if a line is shorter than the number?

It stays as it is. Only lines longer than the number are cut.

Are spaces counted as characters?

Yes. Spaces, punctuation and digits all count as characters, so million stars. with 14 keeps exactly 14 characters, including the space.

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 Modify Tools

Last updated: 28 October 2026

Similar Posts

  • Remove Empty Lines

    Home / Remove Tools / Remove Empty Lines Free online text tool Remove Empty Lines Remove Empty Lines deletes the empty lines and the lines that only contain spaces from your text. Paste your text, click the button and copy the result. It is free and runs in your browser. Remove Empty Lines Tool Import…

  • Snake Case

    Snake Case Converter – Convert Text to snake_case Online | WordTweek Home / Special Effects / Snake Case Free online text tool Snake Case Snake case converts text to lowercase and replaces spaces with underscores, so helloWord this is an example of how snake caseLooks becomes hello_word_this_is_an_example_of_how_snake_case_looks. It also splits camelCase words and is commonly…

  • Extract Text Between

    Home / Extract Tools / Extract Text Between Free online text tool Extract Text Between Two Characters Extract Text Between finds the text that sits between a start and an end character or word and lists each match on its own line. Paste your text, enter the start and end, and copy the result. It…

Leave a Reply

Your email address will not be published. Required fields are marked *