Extract Text Between

Free online text tool

Extract Text Between Two Characters

Extract Text Between finds the text that sits between a start and an end character or word and lists each match on its own line. Paste your text, enter the start and end, and copy the result. It is free and runs in your browser.

Extract Text Between Two Characters Tool

0Character Count
0Character Count (without spaces)
0Word Count
0Sentence Count
0Paragraph Count
0Line Count

Extract Text Between Example

Start: [   End: ]

Before
There's an art to getting your way, and [spitting olive pits across] the table isn't it.
After
spitting olive pits across

Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.

Suggest a New ToolProvide Feedback on This Tool

What does Extract Text Between do?

This tool finds the text between a start and an end that you choose and puts each match on its own line. Everything else is removed from the result.

The start and end can be single characters, such as [ and ], or whole words and tags. It works line by line, finds every match on a line from left to right, and skips empty matches. The match is case sensitive.

Use it to pull out the words inside brackets, quotes or tags, the values between two labels, or the parts of a log line that sit between two markers. Tick Include the start and end text to keep the markers, or Remove duplicate matches to list each match once.

Extract text between examples

Each example shows the text before and after extracting, with the start and end text used. Both options are off unless the example says otherwise.

CaseBeforeAfter
Square brackets
[ to ]
There's an art to getting your way, and [spitting olive pits across] the table isn't it.
spitting olive pits across
Several matches on a line
[ to ]
Items: [apple], [pear] and [plum]
apple
pear
plum
Several lines
( to )
Name: (Ann)
No match here
Name: (Bob)
Ann
Bob
Words or tags as markers
<b> to </b>
<b>Hello</b> and <b>World</b>
Hello
World
Same start and end
" to "
He said "yes" and "no"
yes
no
Markers included (option on)
[ to ]
a [b] c
[b]
Duplicates removed (option on)
[ to ]
[x] [y] [x]
x
y

How to extract text between two characters

  1. 1
    Add your text
    Paste your text into the box, or import a text file.
  2. 2
    Enter the start and end
    Type the start text in Extract text starting from and the end text in Extract text ending at.
  3. 3
    Click Extract Text Between
    Every match is found and put on its own line. Use Undo if you change your mind.
  4. 4
    Copy it
    Click Copy and paste the list where you need it.

When to extract text between

Good for

Pulling out the words inside brackets, quotes or tags, the values between two labels, and the parts of log lines, templates and lists that sit between two markers.

Check first

The start and end must be on the same line, and the match is case sensitive. Matches are not nested, so in [a [b] c] the match is a [b. The result replaces your text, so use Undo if you need the original.

Other tools

To delete the text between two characters instead try Remove Text Between. To change it try Replace Text Between.

Extract text between FAQ

What does the Extract Text Between tool do?

It finds the text that sits between a start text and an end text that you choose, and puts each match on its own line. Everything else is removed from the result.

How do I extract text between two characters?

Paste your text, type the start text in Extract text starting from and the end text in Extract text ending at, then click Extract Text Between. For example, with [ and ] the text a [b] c gives b. Click Copy to use the result, or Undo to go back.

Can I use words instead of single characters?

Yes. The start and end can be any text, such as a word, a tag like <b> and </b>, or several characters. The match is case sensitive, so Start and start are different.

What if there are several matches on one line?

Each match is returned on its own line, from left to right. In Items: [apple], [pear] you get apple and pear.

Does it work line by line?

Yes. The start and end text must be on the same line. A match is never taken across a line break, and a line without a match adds nothing to the result.

Can I keep the start and end text in the result?

Yes. Tick Include the start and end text and each match is returned with them, so [b] stays [b].

Can the start and end text be the same?

Yes. With a quote mark as both, the text He said "yes" and "no" gives yes and no, because each pair of quotes is one match.

Does it remove duplicate matches?

Not by default. Tick Remove duplicate matches to list each match only once. An empty match, such as [] with nothing inside, is always skipped.

What if nothing is found?

The text is left as it is and you see the message No text found between the start and end text.

Is this tool free and is my text private?

Yes. It is free, needs no account and runs in your browser, so your text is not uploaded to a server.

Looking for more text tools?

Browse Extract Tools

Last updated: 9 November 2026

Similar Posts

  • Remove Duplicate Words

    Home / Remove Tools / Remove Duplicate Words Free online text tool Remove Duplicate Words Remove Duplicate Words removes repeated words from your text or keywords and keeps the first copy of each. Paste your text, click the button and copy the result. It is free and runs in your browser. Remove Duplicate Words Tool…

  • Remove Text Between

    Home / Remove Tools / Remove Text Between Free online text tool Remove Text Between Two Characters Remove Text Between deletes everything between two characters or words that you choose, such as [ and ]. Paste your text, enter where to start and end, and copy the result. It is free and runs in your…

  • Slashed

    Slashed Text Generator – Copy & Paste Slash Text | WordTweek Home / Special Effects / Slashed Text Free online text tool Slashed Text This slashed text generator rewrites your text so that every character has a slash through it, such as S̷l̷a̷s̷h̷e̷d̷ T̷e̷x̷t̷. Type or paste your text, then copy the result into your…

  • Upper Case

    Home / Basic Tools / Upper Case Free online text tool Upper Case Upper Case changes every letter to a capital letter, so hello world becomes HELLO WORLD. Type or paste your text below, click the button and copy the result. It is free and runs in your browser. Upper Case Text Tool Import From…

  • Pascal Case

    Pascal Case Converter – Convert Text to PascalCase Online | WordTweek Home / Special Effects / Pascal Case Free online text tool Pascal Case Pascal case capitalizes the first letter of every word and removes the spaces, so Kyle likes to learn how to code becomes KyleLikesToLearnHowToCode. This casing is commonly used in coding for…

Leave a Reply

Your email address will not be published. Required fields are marked *