Skip to content
ToolPlankDEV
Text Tools
100% In-Browser Execution

Updated:

Text Splitter Online

Paste your text and this text splitter cuts it into parts by characters, words or lines, splits it at a comma or any delimiter, or wraps long lines at a set width. Words stay whole, parts can be labelled, and nothing is uploaded.

Options:

Only used when splitting at a delimiter

Text to split

Input
0 chars · 0 lines

Split text

Ready
Processing in browser...
0 chars · 0 linesUpdates as you type

Parts

The size of each part is listed here after you paste text.

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use Text Splitter

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste your text

    Paste the text into the left box or press Sample. It can be a long prompt, an article, a list on one line or a transcript.

  2. 02

    Choose how to split it

    Pick Split by: characters, words or lines per part, a delimiter such as a comma, or Wrap lines at a width. Then type the size. Leave Do not cut words ticked so every cut falls on a space.

  3. 03

    Copy the parts

    The parts appear on the right, separated by a --- line, a blank line or a single line break. Tick Add Part 1 of N labels if you will paste them one at a time. The panel below lists the length of each part.

What a text splitter does

A text splitter cuts one long piece of text into smaller pieces. You choose where the cuts fall: after a number of characters, words or lines, or at every comma, semicolon or other delimiter. The result is a set of parts you can use one by one.

Common jobs are fitting a long message into a limit, such as a chat box or an SMS field, turning a one-line list into a column, breaking a long script into sections and shortening very long lines for a plain-text email. The size you enter is the maximum, so a part can be shorter but never longer.

A worked example

Splitting this sample at 100 characters, with labels on and a blank line between parts:

Text
[Part 1 of 3]
A text splitter cuts a long piece of writing into smaller parts. People use it to fit a long prompt

[Part 2 of 3]
into a chat limit, to break a script into scenes, or to turn one long line into a column.

This

[Part 3 of 3]
sample is split at 120 characters. Words stay whole, so no part ends in the middle of a word.

Each part is 99 characters or fewer, and every cut fell on a space. Part 2 holds a paragraph break because the tool counts characters, not sentences.

Split text by characters, words or lines

  • Characters per part: each part holds at most the number you enter. A line break counts as one character. An emoji counts as two, because browsers store it as two code units, but it is never cut in half.
  • Words per part: each part holds that many words and keeps the spacing and line breaks that were between them.
  • Lines per part: each part holds that many lines. Empty lines count as lines. Windows line endings are treated as normal line breaks.

With Do not cut words ticked, a cut that would land inside a word moves back to the last space. The space is dropped from the end of one part and from the start of the next. A single word longer than the size, such as a long web address, is cut at the size, because the limit is a hard one.

Split text by delimiter

Choose A delimiter to split at every comma, semicolon, period, pipe or any text you type. Each piece goes on its own line. Type \n for a line break and \t for a tab.

Splitting red; green;;blue ; at a semicolon gives:

Text
red
green
blue

Trim and skip empty pieces removed the spaces and the two empty pieces. Untick it when empty pieces matter, for example when the position of each field counts. To go the other way and join lines into one, use List to Comma Separated. To put quotes or a prefix around every piece afterwards, use Add Text to Each Line.

Wrap lines at a width

Wrap lines at a width does what word wrap does in an editor. Every line longer than the width is broken at a space, and your own line breaks are kept. Wrapping the sample at 50 characters gives:

Text
A text splitter cuts a long piece of writing into
smaller parts. People use it to fit a long prompt
into a chat limit, to break a script into scenes,
or to turn one long line into a column.

This sample is split at 120 characters. Words stay
whole, so no part ends in the middle of a word.

Lines that already fit are left exactly as they are. If you need the opposite and want to join wrapped lines into paragraphs, use Remove Line Breaks. For comment, quote and list prefixes that stay on every line, a width ruler and rejoining old line breaks, use Word Wrap.

Split a long prompt into chunks for ChatGPT

Chat tools limit how much you can paste at once. To send a long text in pieces, split it by characters, tick Add Part 1 of N labels and paste one part at a time. The labels tell the chat how many parts to expect.

This tool does not call any chat service. It only prepares the text, and you paste the parts yourself.

Splitting text in Excel and in code

To split a cell in Excel, use Data, then Text to Columns, or the TEXTSPLIT function in current versions. This page is for text that is not in a sheet yet. Paste the cell contents here, split them, and paste the result back.

In Python, splitting at a delimiter is one call:

Python
"red; green;;blue".split(";")

Splitting into fixed-size chunks needs a short loop. If you want to see what the right result looks like first, run the same text through this page.

Limits

  • Cuts fall on spaces, not on sentences or paragraphs. The tool does not try to understand meaning.
  • Characters are counted as UTF-16 code units, the way JavaScript counts. A letter with a separate combining mark counts as two and could be separated from its mark when Do not cut words is off.
  • Languages written without spaces between words, such as Chinese or Japanese, split only at the size you enter, because there are no spaces to cut at.

Splitting happens in your browser. What you paste is not uploaded or stored. See the Privacy Policy for details.

Frequently Asked Questions

Technical Q&A for Text Splitter

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the text, pick Split by, and type a size. The parts appear on the right with a separator between them, ready to copy.

Split by characters, leave room under your limit, and tick Add Part 1 of N labels. Then paste the parts one at a time. Limits are counted in tokens, so stay below the number you know.

Choose A delimiter and type the character, for example a comma. Each piece goes on its own line, with spaces trimmed and empty pieces removed unless you untick that option.

Divide the length by the number of parts you want and enter that as the size. Count the characters in the status line under the input, then round up so the last part is not left over.

No, not while Do not cut words is ticked. The cut moves back to the last space. Only a single word longer than the size is cut.

Use Split by lines with a size of 1, or choose A delimiter and type \n. Both give one line per piece, and the delimiter option can also drop empty lines.

Choose Wrap lines at a width and type the width, for example 80. Lines longer than that are broken at spaces, and your own line breaks stay. For comment and quote prefixes, a ruler and rejoining old line breaks, use Word Wrap.

Select the cells, open Data, then choose Text to Columns, or use the TEXTSPLIT function in current Excel versions. To prepare text before it goes in a sheet, split it on this page.

Yes. Spaces and line breaks count toward the size, as they do in most limits. A part never has trailing spaces when Do not cut words is on.

No. The splitting runs in your browser and the text is not sent to a server.