Regex Extractor — Free Online Tool

Extract every JavaScript regex match with capture groups, index, line, and column, then download the results as JSON or CSV.

Use this free online Regex Extractor directly in your browser. No signup required, no data leaves your device. Part of Utilier — a collection of 133+ developer utilities.

What is Regex Extractor?

A regular-expression extractor applies a pattern to input text and returns structured match records instead of only a pass or fail result. Each record includes the full match, capture groups, UTF-16 index, line, and column, making it useful for turning semi-structured text into data.

Why use regex extractor?

When logs, exports, or plain text contain repeated data, manually copying values is slow and error-prone. Structured match output is easier to inspect, automate, and hand to another tool.

When to use regex extractor

Use it to pull emails, IDs, URLs, dates, headings, or log fields from text. Test patterns against representative edge cases; a successful match does not prove that every desired record was captured.

How to use regex extractor

Enter a JavaScript-compatible pattern, choose flags, and paste source text.

  1. Write the pattern: Add capture groups around fields you need in the exported records.
  2. Set flags: Use g for all matches and i or m only when the data needs them.
  3. Review match locations: Confirm the full match and capture values at their reported lines and columns.
  4. Export results: Copy JSON for structured processing or download CSV for spreadsheet review.

Key features

  • All-match extraction: Forces global matching so every matching record is collected.
  • Capture groups: Preserves numbered groups alongside each full match.
  • Location metadata: Reports index, one-based line, and one-based column for every result.

Common use cases

  • Log analysis: Extract request IDs, statuses, and timestamps from local logs.
  • Data cleanup: Turn repeated text records into JSON or CSV before further processing.
  • Content auditing: Locate URLs, emails, or references in a text export.

Examples

Extract email parts

(\w+)@(\w+\.\w+) with gi against ada@example.com
One record with full match ada@example.com and groups ada, example.com.

Extract log IDs

request_id=([a-z0-9-]+) with g
One record per request_id with its text location.

Technical reference

The extractor uses the browser's JavaScript RegExp engine.

g flag
Global matching is enabled so all occurrences are returned.
Capture groups
Parenthesized groups appear as numbered entries. An optional unmatched group is null.
Index
The index is a zero-based JavaScript string offset, measured in UTF-16 code units.
Line and column
Line and column are one-based positions intended for quick human inspection.

Common mistakes to avoid

Forgetting to group the fields you need

Why it happens: Only parenthesized capture groups are returned separately.

How to avoid it: Wrap each desired field in a capture group and use non-capturing groups for structure only.

Using greedy wildcards

Why it happens: A pattern such as .* can consume across several intended fields.

How to avoid it: Use a delimiter-aware character class or a lazy quantifier, then verify all matches.

Treating indexes as character counts

Why it happens: JavaScript indexes use UTF-16 code units, so some emoji occupy two units.

How to avoid it: Use the displayed line and column for review and account for encoding in downstream code.

Frequently asked questions

Which regex syntax is supported?

The tool uses the browser's JavaScript RegExp syntax and flags.

Why is g added automatically?

The extractor's purpose is to return every matching occurrence, not just the first one.

What does null capture group mean?

An optional group did not participate in that particular match.

Are exported matches uploaded?

No. Matching and exports run locally.

References

Privacy and availability

  • Runs entirely in your browser — zero server processing
  • No signup or account required
  • Works offline once loaded
  • Fast, lightweight, no external dependencies
  • Available as a browser extension for Chrome and Firefox