OnlineTextLab
Esc

Text Splitter

Breaks long text into pieces that fit a limit, without cutting a word or an emoji in half, and gives each piece its own Copy button.

Split by

Parts

Each part appears here with its own Copy button.

Ctrl or Cmd + Enter copies all parts.

Runs on your device. Your files and text are not uploaded.

About Text Splitter

Plenty of tools limit how much you can paste at once: social posts, form fields, translation services, an old CMS. Cutting long text by hand is slow and tends to end mid-word. Set a size and the text is split straight away into numbered parts, each one showing its length and carrying its own Copy button.

Splitting by characters keeps words whole by default, backing up to the last space before the limit, so the parts read normally. You can also split by a number of words, a number of lines, or at a separator you choose, which turns a, b, c into three separate items.

Copy all gathers the parts into one text, with or without --- Part 1 --- headings, and Download saves the same thing. The per-part Copy buttons suit pasting into a form one piece at a time.

How it works

Text is first trimmed and its line endings are normalized. In Characters mode, it is measured in the characters a reader sees, using the browser's grapheme segmenter, so a family emoji or a flag is never cut in two. A part ends at the size you set. If that falls inside a word and Keep words whole is on, the part ends at the previous space instead. A single word longer than the limit is cut, since there is nowhere else to break it.

Words mode splits at any run of whitespace, and rejoins each group with single spaces, which means line breaks inside a part become spaces. Lines mode groups complete lines and keeps their line breaks. Separator mode cuts wherever the separator appears, trims each piece, and drops empty ones, and it accepts \n and \t for a new line and a tab.

Up to 200 parts are drawn on the page, to keep it fast, and Copy all and Download always include every one.

How to use Text Splitter

  1. Paste into the Text to split box, or press Upload. Try an example loads a long customer message.
  2. Under Split by, choose Characters, Words, Lines or Separator.
  3. Set the size, for example Characters per part, or type your Separator.
  4. Leave Keep words whole on, unless you need exact character blocks.
  5. Use Copy on any part, or Copy all at the top. Add part headings when copying all controls the --- Part 1 --- labels.

60 characters per part, with words kept whole

Input
Your parcel arrives tomorrow between 2 pm and 5 pm. The courier will text you 30 minutes before arriving.
Output
--- Part 1 ---
Your parcel arrives tomorrow between 2 pm and 5 pm. The

--- Part 2 ---
courier will text you 30 minutes before arriving.

Part 1 stops at 55 characters, since courier would have run past the 60 limit. With Keep words whole off, it would stop at exactly 60, partway through that word.

When it helps

  • Dividing a long announcement into a thread, each part under a post limit.
  • Feeding a long document to a translation or review service that caps the size of each request.
  • Batching a list of 5,000 IDs into groups of 500 lines for a system that takes limited input.
  • Turning a comma-separated export into separate items you can read one at a time.

Tips for a better result

  • Set your limit a little under the real one if you plan to add 1/5 numbering to each part, since that counts as well.
  • Splitting at sentence boundaries is possible with Separator: try . to get one sentence a part. The separator itself is removed, so you would need to add the periods back.
  • To check a part against a specific platform, paste it into the Character Counter. X and SMS count some characters as more than one, and this tool's Characters mode does not.
  • To reverse the job later, the Text Joiner puts lines back together with the separator you choose.

Good to know

  • It splits by size and has no idea what the text means, so a part may end in mid-sentence. Read the parts through if they are going to be published.
  • Characters mode counts each visible character as 1, regardless of how a given platform weighs emoji or CJK text.
  • Separator mode takes plain text, not a regular expression, and removes the separator from the output.
  • Words mode treats a line break as a space, so paragraph structure is lost within a part. Use Lines mode if that matters.

Questions people ask

Can I split text into equal parts?

Choose a size by dividing the total length by the number of parts you want. With Keep words whole on, parts will vary slightly, because each ends at a space. Turn it off for blocks that are all exactly the same length, except the last.

How do I split text at each comma?

Choose Separator and type a comma. Each piece appears as its own part, with surrounding spaces trimmed. Empty pieces, from two commas in a row, are skipped.

Will it split an emoji or an accented letter?

No. Every split falls between whole characters as a reader sees them, so even a family emoji built from seven code points stays together. Basic slicing by code units, which many scripts use, can leave a broken symbol at the join.

What to use next

Last reviewed . Read our editorial policy.