Remove First/Last N Chars
Cut a fixed number of characters from the start and/or end of each line.
- Runs in your browser
- Free to use
About this tool
Remove First/Last N Characters is positional trimming: it cuts a fixed number of characters from the beginning and/or end of every line, regardless of what they are. It is the right choice for fixed-width exports, timestamps at the start of log lines or checksums appended to records.
Need to replace the cut part instead? See Replace First/Last N Characters.
How to use it — quick steps
- 01
Enter the lines
Type or paste the lines in the field above, one item per line. Use Ctrl + V to paste from the clipboard.
- 02
Press "Remove characters"
Press "Remove characters" or Ctrl + Enter. The result appears instantly below the form.
- 03
Read the result
It appears in the dark panel under the form instantly. Every block has [copy] and other actions.
Key features of this tool
Nothing leaves your browser
The processing is plain JavaScript that runs on your device: the text you paste is never uploaded to our servers or to anyone else.
Instant results
Results appear the moment you press the button, even for long inputs, and every block has copy and download actions.
Works everywhere
No installation, no account and no limits: the tool works on desktop and mobile, in any modern browser, as often as you like.
Frequently asked questions
What happens to lines shorter than N?
They become empty rather than wrapping around.
Are characters or bytes counted?
Unicode characters, so multi-byte letters and emoji count as one.
Are my files or data uploaded?
No. The tool is plain JavaScript that runs in your browser; the files or data you provide here are never uploaded to our servers.