Unicode Text Wrap & Line Formatter
Wrap text by graphemes, words or display columns, with CJK and emoji widths, tab stops and exact LF/CRLF downloads.
Choose the correct unit
Grapheme mode wraps at Unicode cluster boundaries and never separates a combining mark, joined emoji or flag. Word mode prefers Intl.Segmenter word boundaries while measuring grapheme count. Display-column mode uses string-width 8.3, where common CJK characters and emoji usually occupy two columns. Ambiguous-width characters can be treated as narrow or wide.
Tabs, paragraphs and long words
Tabs expand to spaces at the next display-column tab stop before wrapping. Original line breaks remain unless Join soft lines is enabled, which trims and joins lines within blank-line-separated paragraphs. Spaces at newly inserted word boundaries are discarded. Long words can be split on grapheme boundaries or retained with an overlong diagnostic. A single grapheme wider than the chosen column limit is rejected rather than split.
Copy and download preserve the requested newlines
The preview textarea may display CRLF as LF because browsers normalize textarea values. Copy and Download use the original result bytes and preserve the selected line ending. Display columns are an approximate terminal-style measure, not pixel width in a proportional font. Control sequences are rejected; input is limited to 200,000 UTF-16 units and output to 1,000,000.
Questions & answers
Why does a Chinese line wrap earlier than an English line?
In display-column mode, a common Chinese character occupies two columns while a Latin letter usually occupies one. Choose grapheme mode when each visible cluster should count as one.
Is this a Markdown or code formatter?
No. It wraps plain text and can change indentation or paragraph layout. It does not understand code syntax, Markdown fences or table structure.
Are inputs uploaded or stored?
No. Processing runs on this device in a Web Worker. Input text is not sent to an API or saved in local storage. Changing an option cancels old work and clears the prior result.
Other Languages
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Check words, paragraphs, blank lines and grapheme mode without splitting emoji, surrogate pairs or combining sequences.
- Comparison reference
- Fixed text fixtures and grapheme-boundary assertions.
- Verification scope
- These samples and boundaries do not prove correctness for every input.
Test source and cases (select a file to read it)
-
text-wrap-tools.test.js
- word wrapping preserves words, original paragraphs and blank lines
- grapheme mode never splits ZWJ emoji, surrogate pairs or combining sequences
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.