Text Extractor

Extract substrings from raw text, code, or logs using start and end delimiters, regular expressions, column positions, or common pattern presets with side-by-side editing.

How to Use the Text Extractor

1

Enter or Upload Source Text

Paste your text, code snippet, log file, or document into the left editor, upload a local file, or click Sample.

2

Configure Extraction Rules

Select your extraction strategy (Delimiters, Regex, Presets, or Columns), set boundary characters, and toggle deduplication.

3

Extract & Export Results

Click Extract Text to view isolated items on the right, then click Copy or Download.

Tool Options

4 Flexible Extraction Strategies

Extract using Start/End delimiters (with optional boundary inclusion), custom Regex capture groups, built-in presets, or column splitters.

Built-in Pattern Presets

Instantly extract Emails, Web URLs, IPv4 Addresses, Numbers, Quoted strings, and HTML/XML markup tags with zero regex writing.

Output Formatting & Deduplication

Format extracted matches into newline-separated lists, comma-delimited strings, or structured JSON arrays with automatic deduplication.

Your Data Privacy

Web Tool
Privacy-First Architecture
Most of our web tools process your data entirely in-browser. Where server processing is technically required, payloads are evaluated statelessly in-memory and are never stored, saved, or logged.
REST API
Stateless In-Memory Processing
When you use our API endpoints, your requests are processed strictly in-memory without persistent database storage, disk logging, or data retention.
Want to learn more about how we safeguard your information and infrastructure?
Read our full Privacy Policy for detailed security standards, data retention principles, and compliance guarantees.

What does the Text Extractor do?

The Text Extractor isolates, matches, and extracts specific substrings and tokens from unformatted text, multiline logs, code files, and documents using a side-by-side dual-pane workspace. It supports extraction between start/end delimiters, custom regular expressions, column splitters, or built-in presets (Emails, URLs, IPv4 addresses, Numbers, and HTML tags).

Core Concepts

Understanding text extraction strategies:

  • Delimiter-Based Extraction: Extracts substrings bounded by specified start and end markers (e.g. text between [ and ], or between quotes).
  • Regular Expression Capture: Employs ECMAScript regular expressions to extract specific capture groups or entire regex matches.
  • Built-in Presets: Pre-compiled regex patterns to extract common developer entities like RFC 5322 email addresses, HTTP(S) URLs, IPv4 addresses, and numbers.
  • Column / Field Splitting: Extracts a specific 1-indexed field across multiline tabular logs or CSV/TSV data separated by custom delimiters.
  • Deduplication & Formatting: Automatically removes duplicate matches and formats results as single-column lines, comma-separated lists, or JSON arrays.

How to use the tool?

  1. Enter or Upload Source Text: Type or paste text into the left editor, upload a local file, or click Sample.
  2. Configure Extraction Rules: Select an extraction mode (Delimiters, Regex, Presets, or Columns), set boundary characters or patterns, and select output formatting.
  3. Inspect Extracted Items: Click Extract Text to view matched items in the right editor.
  4. Copy or Export: Click Copy to copy the extracted results to your clipboard or Download to save as .txt or .json.

Context-Aware Practical Workflow Guides

Extracting Log Timestamps & IDs

  • Set Start Delimiter to [ and End Delimiter to ] to extract all bracketed timestamps, severity levels, and thread names from server log streams.

Scraping URLs & Email Addresses

  • Select Common Pattern Presets and choose URLs and Links or Email Addresses to aggregate contact information or API endpoints from raw text files.

Related Developer Utilities

  • Text Diff Tool: Compare two text documents side-by-side with line and character diff highlighting.
  • Prompt Variable Extractor: Detect and extract template placeholders ({{var}}, ${var}, <var>) with JSON Schema synthesis.
  • Text Sorter: Sort text lists, logs, and strings alphabetically or numerically.
  • Regex Generator: Build and test regular expression patterns interactively.

REST API Integration

blueutils.com provides a free REST API endpoint (POST https://blueutils.com/api/text/extractor) for programmatic text extraction.

API Request Parameters

Name Type Description Example
rawText String The source text to extract from. "[INFO] User logged in: alice"
mode String Extraction mode: "delimiters", "regex", "preset", or "column". "delimiters"
startDelimiter String Starting delimiter character or string. "["
endDelimiter String Ending delimiter character or string. "]"
includeDelimiters Boolean Whether to retain delimiters in output (default: false). false
outputFormat String Format: "lines", "comma", or "json" (default: "lines"). "lines"
removeDuplicates Boolean Whether to deduplicate matches (default: false). false

API Request Payload Examples

cURL

curl -X POST https://blueutils.com/api/text/extractor \
  -H "Content-Type: application/json" \
  -d '{
    "rawText": "[2026-08-25] [INFO] User alice logged in from 192.168.1.1",
    "mode": "delimiters",
    "startDelimiter": "[",
    "endDelimiter": "]"
  }'

Python

import requests

url = "https://blueutils.com/api/text/extractor"
payload = {
    "rawText": "[2026-08-25] [INFO] User alice logged in from 192.168.1.1",
    "mode": "delimiters",
    "startDelimiter": "[",
    "endDelimiter": "]"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())

Java

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        String jsonPayload = """
            {
                "rawText": "[2026-08-25] [INFO] User alice logged in from 192.168.1.1",
                "mode": "delimiters",
                "startDelimiter": "[",
                "endDelimiter": "]"
            }
            """;

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://blueutils.com/api/text/extractor"))
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

API Response Parameters

Name Type Description Example
isValid Boolean Indicates whether extraction succeeded. true
extractedItems Array Array of extracted string matches. ["2026-08-25", "INFO"]
extractedText String Formatted output text. "2026-08-25\nINFO"
stats Object Match count, unique count, and lines processed metrics. { "totalFound": 2, "uniqueCount": 2 }

API Response Payload Examples

Success Response (HTTP 200 OK)

{
  "isValid": true,
  "extractedItems": [
    "2026-08-25",
    "INFO"
  ],
  "extractedText": "2026-08-25\nINFO",
  "stats": {
    "totalFound": 2,
    "uniqueCount": 2,
    "linesProcessed": 1,
    "mode": "delimiters"
  }
}

Validation Failure Response (HTTP 400 Bad Request)

{
  "isValid": false,
  "error": "Text input cannot be empty."
}

Rate Limit Exceeded Response (HTTP 429 Too Many Requests)

{
  "error": "API rate limit exceeded. Please wait or contact support@blueutils.com."
}

Why use an API to extract text?

  • ETL Data Pipelines: Isolate IDs, UUIDs, and foreign keys from unstructured log lines before warehouse loading.
  • Log Processing Microservices: Ingest syslog streams and extract IP addresses, trace IDs, and HTTP status codes dynamically.

Native Usage

How to extract text locally in terminal environments:

Windows (PowerShell)

# Extract text between brackets in PowerShell
$text = "[2026-08-25] [INFO] User logged in"
[regex]::Matches($text, '\[(.*?)\]') | ForEach-Object { $_.Groups[1].Value }

Linux / Unix (Bash)

# Extract text between delimiters using grep and sed in Bash
echo "[2026-08-25] [INFO] User logged in" | grep -oP '\[\K[^\]]+'

Python

Using Python standard library:

import re

text = "[2026-08-25] [INFO] User alice logged in"
matches = re.findall(r'\[(.*?)\]', text)
print(matches)

Java

Using Java standard library:

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class TextExtract {
    public static void main(String[] args) {
        String input = "[2026-08-25] [INFO] User alice logged in";
        Pattern pattern = Pattern.compile("\\[(.*?)\\]");
        Matcher matcher = pattern.matcher(input);

        while (matcher.find()) {
            System.out.println(matcher.group(1));
        }
    }
}

Frequently Asked Questions (FAQ)

How do I extract text between two delimiters online?

Paste your raw text into the left editor, select Extract Between Delimiters, and enter your Start Delimiter (e.g. [) and End Delimiter (e.g. ]). The extracted substrings appear instantly in the right editor.

Can I extract text using Regular Expressions (Regex)?

Yes. Choose Custom Regex Pattern mode, input your regular expression (with optional capture group 1), and the tool will extract all matching occurrences.

Can I extract specific columns from CSV or TSV log lines?

Yes. Switch to Extract by Column Delimiter, specify your delimiter (e.g. comma, tab, pipe), choose the 1-indexed column number, and extract that field across all lines.

Does the Text Extractor support deduplication and JSON output?

Yes. Check Remove Duplicates to filter unique matches, and choose between Newline-separated lists, Comma-separated strings, or structured JSON arrays.

Are my extracted data or logs uploaded to external servers?

No. All delimiter matching, regex execution, and formatting happen 100% locally in your browser for total privacy.

Rate Limits

UI Limits
100 uses per 15 minutes
Max payload size: 5 MB
API Limits
5 requests per 60 minutes
Max payload size: 256 KB
Need higher API rate limits, increased payload sizes, or custom developer solutions?
Contact our engineering team at support@blueutils.com for custom rate limit increases, higher quota allocations, or tailored enterprise integrations.