YourTools.
简体中文
Back to the catalog
Tools

Wrap lines to a fixed length

Break every line into pieces of at most a set number of characters or display columns, optionally only between words.

Process locally

Files stay in this browser session. Closing or clearing releases them.

Add text

Type or paste the text to process

Adjust settings

Optional: Line length, Count, Break only between words

Wrap lines to a fixed length

Run

Processes in this browser; cancel at any time

Add text first

About this tool

Break long lines into pieces of a fixed length, such as 40 characters. Use it to fit text into a field with a per-line limit, split a long note into short chunks, or keep a plain-text email or text shown in a terminal at a tidy width.

Length can be counted in characters or in display width, where Chinese, Japanese and Korean characters count as two columns, and you can choose to break only at spaces. Emoji and accented letters are never cut in half. Up to 1 MB of text is processed in your browser and is not uploaded.

How to use it

  1. Paste your text, or select Use example.
  2. Set the “Line length” (1 to 1000, 40 by default) and choose how to “Count”: “Characters” or “Display width (Chinese counts 2)”.
  3. Tick “Break only between words” if English words should not be split.
  4. Select Run, then preview wrapped.txt and download it.

Formats and limits

Input
Text
Output
Plain text
Size limit
1 MB
Settings
Line length; Count (Characters, Display width); Break only between words
Privacy
Files stay in the current browser session. No file bytes are uploaded.
Price
Free, no sign-up

Common questions

What is the difference between “Characters” and “Display width”?

With “Characters”, every character counts as one, Chinese included. With “Display width (Chinese counts 2)”, Chinese, Japanese and Korean characters and full-width punctuation count as two, so lines look equally wide in a monospaced font; at a length of 4, 中文abc becomes 中文 and abc.

Why are words cut in the middle?

By default the text is cut exactly at the line length. Tick “Break only between words” to break at the last space instead; a single word longer than the line length is still cut, and Chinese text without spaces is broken at the length as before.

Does it join short lines back together?

No. Existing line breaks are kept and each line is wrapped on its own, so short lines stay as they are. To re-flow a paragraph, first join its lines with a space in Split and join text.

Why do some lines start or end with a space?

Without “Break only between words”, the text is cut at exactly the line length and spaces stay where they fall. With that option on, the space at each break is removed.