Skip to content
JustDevTools
  • JSON formatter and validator
    Format, minify and validate JSON, with the exact line and column of any syntax error.
  • JWT decoder
    Read a JWT's header and payload, with issued-at and expiry times shown as real dates.
  • Base64 encoder and decoder
    Encode and decode Base64 and Base64URL, with full Unicode support.
  • JSON to TypeScript, Zod and Java
    Paste a JSON response and get TypeScript interfaces, a Zod schema or Java classes with Jackson annotations.
  • YAML to JSON converter
    Convert YAML to JSON and JSON to YAML, with the exact line of any syntax error. Handles multi-document files.
  • Regex tester
    Test JavaScript regular expressions with live match highlighting, capture groups and replace preview.
  • URL encoder and decoder
    Percent-encode and decode URLs and query values, and break a URL into its parts and parameters.
  • Unix timestamp converter
    Convert Unix timestamps in seconds or milliseconds to dates, and dates back to timestamps.
  • Cron expression explainer
    See what a cron expression means in plain English, what each field does and the next times it will run.
  • JSON to CSV converter
    Turn a JSON array into CSV for Excel or Google Sheets, or a CSV file into JSON. Nested objects become columns.
  • UUID generator and inspector
    Generate UUID v4 and time-ordered v7 in bulk, or paste a UUID to see its version and timestamp.
  • Text diff checker
    Compare two texts line by line and see exactly what was added, removed or changed.
  • Hash and HMAC generator
    SHA-256, SHA-1, SHA-384 and SHA-512 hashes and HMAC signatures of text, in hex or Base64.
  • Markdown previewer
    Write Markdown on the left and see it rendered live on the right, with GitHub-style tables and task lists.

Regex tester

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

Runs locally. Nothing you paste leaves this tab.

/g

Matches

Contact ada@example.com or support@toolbench.dev.
Invalid: bob@, @example.com

How this tester works

Patterns run with your browser’s own JavaScript regex engine, so what matches here matches in Node.js and front-end code. Each run happens in a background worker with a time limit. A pattern that backtracks catastrophically is stopped, and the page doesn’t freeze.

Flags

  • g finds every match instead of stopping at the first.
  • i ignores case.
  • m makes ^ and $ match at the start and end of each line, not only the whole text.
  • s lets . match newlines too.
  • u treats the pattern as Unicode, so \u{1F600} and \p{L} (any letter) work.

Cheat sheet

.        any character except newline
\d \w \s digit, word character [A-Za-z0-9_], whitespace
\D \W \S the opposite of each
[abc]    one of a, b, c         [^abc]  anything except those
^ $      start / end            \b      word boundary
*  +  ?  0+, 1+, 0 or 1         {2,5}   between 2 and 5
*? +?    lazy: as few as possible
(x)      capture group          (?:x)   group without capturing
(?<n>x)  named group            \1      back-reference to group 1
x(?=y)   x followed by y        x(?!y)  x not followed by y
(?<=y)x  x preceded by y        (?<!y)x x not preceded by y

Replacement patterns

In the replacement, $1 inserts the first capture group, $<name> a named group, $& the whole match and $$ a literal dollar sign. For example, pattern (\d{4})-(\d{2})-(\d{2}) with replacement $3/$2/$1 turns 2024-05-31 into 31/05/2024.

Catastrophic backtracking

Nested quantifiers like (a+)+$ or (\w+\s?)*$ can take exponential time on input that almost matches. On a server, this is a denial-of-service risk called ReDoS. Avoid quantifying a group that already contains a quantifier, and make alternatives mutually exclusive.

Differences from other languages

Java and Python use mostly the same syntax, with a few differences. Python writes named groups as (?P<name>…). Java strings need every backslash doubled ("\\d+"). Neither has a g flag: use Matcher.find() in a loop, or re.findall.