hiptool

Regex Tester

Test regular expressions with live match highlighting, groups and replace.

/ /
Flags

Matches highlighted
 
Replace result
 

About this tool

Type a pattern and flags, paste a test string, and matches highlight as you type. The details table lists each match with its index and captured groups, named groups included, and the replace section previews substitutions with $1, $<name> and $& references live.

The dialect is JavaScript's own RegExp, run by your browser, so what works here works in your Node or frontend code unchanged. Since everything stays in the tab, pasting real log lines, URLs or user data to debug a pattern is fine; nothing is sent, stored or logged. Long inputs are capped at 50,000 characters for matching so runaway backtracking cannot freeze the page.

Frequently asked questions

Is it safe to paste real log lines or production data here?
Yes. Matching runs as JavaScript in your browser tab and the text never leaves the page. That is the point: regex testers are exactly where people paste sensitive data.
Which regex dialect does this use?
JavaScript's, as implemented by your browser. Most patterns behave like PCRE, but there are differences: no possessive quantifiers or recursion, and lookbehind plus the u and s flags follow the ECMAScript spec.
Why does my pattern freeze other testers but not run here?
Patterns with nested quantifiers can backtrack catastrophically. To keep the page responsive, matching runs against at most the first 50,000 characters and stops after 1,000 matches, with a note when either limit kicks in.

Related tools

esc