Skip to content
Takikit

Split Text with Regex

Split text into parts using any separator written as a regex, and output one part per line or a JSON array.

Loading tool...

Runs in your browser. Nothing is sent anywhere.

When to use it

Great for a list pasted from Zalo, email or Excel that is separated inconsistently by commas, semicolons and line breaks, when you need clean lines or a JSON array to work with.

The g flag is ignored when splitting, so you do not need it. If your regex has capturing groups ( ), the captured separators are inserted into the result; use (?: ) when you only want grouping without keeping them.

How to use

  1. Type the separator regex.
  2. Paste the text, and choose whether to trim spaces and drop empty parts.
  3. Click Copy or Download file.

Frequently asked questions

Is the data I paste sent to a server?

No. The tool runs in JavaScript right in your browser, and Takikit has no server that receives data. You can turn off your internet after opening the page and the tool will still work.

Related tools

More Developer tools

See all developer tools