EN
My tools

Extract or Remove Text Between Brackets

Pull out the text between parentheses, square brackets, braces, quotes or any two markers, one item per line, or delete bracketed text from a document. Handles nesting.

Extracted text
2 items
Items found
#TextLineLevel
1moved to Friday11
2two roles (one remote)11
My tools →
Advertisement

Pull every piece of text that sits between two markers out of a document: notes in parentheses, citation numbers in square brackets, template fields in {{ }}, quoted titles, or text inside 「」 in Japanese. Or do the opposite and delete everything in brackets, which is handy for cleaning subtitles, transcripts and lyrics of [music] and (laughs). Nested brackets are matched properly with a depth counter, not with a fragile pattern.

How to use this tool

  1. Paste your text.
  2. Choose the brackets or quotes, or set your own start and end markers (several characters are fine, such as <b> and </b>).
  3. Choose to extract the text inside, extract it with the brackets, remove the bracketed parts, or remove only the brackets.
  4. Copy the result; the table shows each item with its line number and nesting level.

Formula

Scan left to right: a start marker pushes its position on a stack, an end marker pops the latest one and closes that pair

The stack depth is the nesting level, so in “a (b (c) d) e” the outer pair holds “b (c) d” and the inner pair “c”. Quotes use the same character to open and close, so they pair up in order and cannot nest; an apostrophe between two letters (don’t) is skipped. A start marker with no end, or an end with no start, is ignored and reported. In remove mode the tidy option collapses the double spaces left behind and removes a space stranded before punctuation.

Example

For the sample text with parentheses, “outermost pairs only” extracts 2 items: “moved to Friday” and “two roles (one remote)”. With “every level”, “one remote” is added as a third item at level 2. Removing the bracketed text gives “The meeting covers the budget [draft 2] and hiring.”

Frequently asked questions

How do I remove everything in brackets from subtitles?

Choose square brackets (or parentheses), pick “Remove bracketed text” and keep “Tidy spaces” on. Run it once more with the other bracket type if the file uses both.

Can I extract text between two words?

Yes. Choose “Custom markers” and type the two words, for example “Subject:” as the start and “Regards” as the end. Markers are matched exactly, including capital letters.

What happens with unbalanced brackets?

Pairs are matched where possible; a leftover start or end marker is ignored and the note under the result says how many there were, so you can check the source.

Last updated:

Cite or embed this tool
APA

kakaoCalc. (2026, November 8). Extract or Remove Text Between Brackets. https://kakao.mobile/tools/delimited-text-extractor/

MLA

“Extract or Remove Text Between Brackets.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/delimited-text-extractor/.

Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms

Advertisement