Keep N Characters Each Line
Process each line independently in your browser and retain its first N code points.
A QUICK WALKTHROUGH
How to use this tool
- Enter text and a whole-number limit.
- Apply the limit independently to every line.
- Review and copy the result.
Per-line Unicode behavior
Each line is processed independently using Unicode code points from Array.from. Extended grapheme clusters may contain multiple code points and are not promised to remain together. LF, CRLF, and CR are accepted; the first detected separator style is used, and blank and trailing lines remain present.
GOOD TO KNOW
Common questions
Are grapheme clusters counted?
No. The limit counts Unicode code points, so a displayed grapheme can use more than one count.
Are line endings preserved?
Yes. Lines, blank lines, the trailing empty line, and the first detected LF, CRLF, or CR separator style are preserved.