Skip to main content

Text & Lists

Wrap Text Lines

Wrap input text at a selected character width.

Tool workspace

Your input stays in this browser.

The result updates after you stop typing.

Ready

You can run the tool again after any change.

Wraps each existing line separately. Width counts Unicode code points, not grapheme clusters or display columns.

Options

Use 1–65536 Unicode code points per new line. Existing line separators and blank lines remain unchanged.

Ready for a result

Wrap input text at a selected character width.

This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.

Wrap Text Lines: Wrap each existing text line at a selected number of Unicode code points. Keep blank lines, spaces, tabs, and existing line separators. Emoji surrogate pairs remain intact.

The result preserves input characters and existing CRLF, LF, CR, U+2028, and U+2029 separators. New wrapping breaks use LF. The browser textarea can normalize pasted CRLF to LF before processing.

  • Split long text lines without removing blank lines.
  • Wrap text that contains emoji without splitting surrogate pairs.
  • Keep existing whitespace while adding line breaks at a fixed codepoint width.

Instructions

  1. Paste the text into Input. Empty input and blank lines are valid.
  2. Set Width (Unicode code points) to a whole number from 1 through 65536.
  3. Review the wrapped text. The tool inserts LF line breaks where a logical line exceeds the selected width.
  4. Copy or save the result. Use the original input when you need to change the wrapping width again.

Example

Input: Wrap this sentence at ten

Settings: Width (Unicode code points): 10

Result: Wrap this sentence a t ten

Lines break at exactly 10 code points, even inside a word. Trailing spaces stay on their line.

Limits

  • Width counts Unicode code points. It does not count grapheme clusters, words, bytes, or screen columns.
  • Combining marks and joined emoji sequences can cross new line breaks. This tool does not perform visual typesetting.
  • The input limit is 1048576 UTF-16 code units. The output limit is 2097152 code units.
  • Existing malformed surrogate code units remain unchanged. The tool does not repair malformed Unicode.