Extract Text Between Characters

Get the text between, before, or after a character from every line.

100% private. Everything runs in your browser. Your data never leaves your device.

Extract Text

What does this tool do?

This tool extracts the text between two characters, or before/after a character, from every line at once. Useful for pulling values out of codes, brackets, and delimited fields. Runs in your browser.

How to use Extract Text Between Characters - Free Online Tool

  1. Paste your text, or click "Try with sample data".
  2. Choose a mode: between two characters, before a character, or after a character.
  3. Enter the character(s) or delimiter.
  4. Click Extract and copy the result.

Example

Extracting text inside brackets:

Before

Text
Order (A123) shipped
Order (B456) pending

After

Result
A123
B456

The text between ( and ) is extracted.

Excel formula alternative

Prefer a formula? You can achieve a similar result with MID + FIND:

=MID(A2, FIND("(",A2)+1, FIND(")",A2)-FIND("(",A2)-1)

This Excel formula is fiddly. This tool does before/after/between in one click.

When should I use this tool?

Parsing codes from strings
Extracting values from brackets
Splitting key-value text
Pulling fields from log lines
Cleaning delimited data
Extracting substrings in bulk

Frequently Asked Questions

Yes. Choose before, after, or between modes.

No, it runs in your browser.

That line returns blank so your rows stay aligned.

Yes, you can enter more than one character as the delimiter.