Skip to content
Menu
Theme

Text Line Tools

Join lines, split text, add quotes around each line, shorten, repeat or cut out part of a text. Six small line tools on one page, in your browser.

TextRuns in your browser
Paste or type. The result updates as you type.
What to do

What is the text line toolkit?

This page collects six small jobs that come up whenever you move text between programs. Each one works on plain text and shows the result as you type. You pick a job at the top, and only the options for that job are shown.

  • Join lines puts every line on one line, with a separator of your choice between them. A column of names copied from a spreadsheet becomes “Anna, Ben, Chi” in one step.
  • Split does the opposite. It breaks text into pieces at a character such as a comma, at a regular expression, every N characters, or into N equal parts. You can add text before and after each piece and choose whether the pieces go on new lines or are separated by commas or spaces.
  • Add before and after puts the same text at the start and end of every line. Wrap each line in quote marks for a code list, add a dash in front to make bullet points, or add a comma at the end.
  • Shorten cuts text down to a maximum length and adds an indicator such as “…” so readers can see something was cut. You can keep the start or the end, and shorten each line on its own.
  • Repeat copies the text a number of times, with an optional separator between the copies.
  • Take a part pulls out a piece of the text by position: start at character 5 and take 10 characters, for example. It can do this for each line separately.

Lengths and positions are counted in real characters, so a Vietnamese letter with accents or a simple emoji like 😀 counts as one, not two. Everything runs in your browser. Nothing you type is sent anywhere.

How to use the text line tools

  1. Paste your text into Your text. A sample is there at first.
  2. Choose a job: Join lines, Split, Add before and after, Shorten, Repeat or Take a part.
  3. Fill in the options that appear. For example, under Join lines set Join with to “, “ and tick Remove empty lines.
  4. Read the Result box. It changes as soon as you change the text or an option.
  5. If a setting cannot work, such as a negative start position or a bad pattern, a short warning appears in place of the result. Fix the setting and the result comes back.
  6. Press Copy result to copy the output.

FAQ

How do I turn a column of values into one comma separated line?

Choose Join lines, type “, “ in Join with, and tick Remove empty lines so blank rows do not leave double commas. Tick Trim line ends if the values have trailing spaces.

How do I put quotes around every line?

Choose Add before and after and type a quote mark in both the before and after fields. Tick the option to skip lines that are already wrapped so you do not end up with double quotes, and skip empty lines if you have gaps in the list.

Does the indicator count toward the maximum length in Shorten?

Yes. With a maximum of 10 and the indicator “…”, you get 7 characters of text plus the three dots. Text that is already short enough is returned unchanged, with no indicator.

What is the difference between splitting every N characters and into N parts?

Every N characters makes pieces of a fixed size, and the last piece may be shorter. Into N parts makes a fixed number of pieces of nearly equal size. Asking for more parts than there are characters shows a warning.

Is there a limit on Repeat?

You can repeat text up to 1,000 times, and the result can be at most 1,000,000 characters long. Above that, a warning appears instead of a result so the page does not freeze.

Is my text sent to a server?

No. All six tools run inside the page on your device. Nothing is uploaded and nothing is kept after you close the tab.

Related tools