JSON Formatter
Format, minify and validate JSON without changing large integers, number notation, key order or string escapes. Import files and locate syntax errors.
Test JavaScript regular expressions, inspect match positions and capture groups, and preview text replacements as you type.
Updates as you type or change an option
Debug patterns for browser and frontend code with the pattern and flags in separate fields. Long-running expressions stop rather than blocking the page indefinitely.
Enter a pattern without enclosing slashes, its flags and some test text. Use g for all matches, i to ignore case and m for multiline anchors. Replacements support JavaScript syntax such as $1 and $.
Expressions run in a separate worker and stop after 1.5 seconds. Limits are 100,000 text characters, 4,000 pattern characters and fewer than 2,000 matches. Narrow the input if results become too large.
This uses the JavaScript regex engine, whose syntax and flags differ from other engines. Omit enclosing slashes. Replacement strings support JavaScript forms such as $1 and $<name>.
Add g to the flags to find all matches. i ignores case; m changes how ^ and $ treat lines, but does not make a dot match line breaks.
With pattern (\w+) (\w+) and replacement $2 $1, Ada Lovelace becomes Lovelace Ada. $& inserts the whole match and $$ inserts a literal dollar sign. Copy the replacement preview when it is correct.
Reduce the test text or make the pattern more specific. Tasks stop after 1.5 seconds; reaching 2,000 matches is also rejected. Partial matches are not presented as a complete result.
Your choice about analytics
We use Umami to measure page visits. Analytics is optional, and your tools work either way.
Your current setting allows analytics.
Your current setting does not allow analytics.
The analytics service has changed. Refresh the page after finishing your current work to apply the new settings.
Your browser is sending a Do Not Track or Global Privacy Control signal. Analytics will remain off.
We use Umami to understand which pages people visit and how they find this site. You can decline or change your choice at any time. All site features will still work.
Your choice is saved in this browser for six months. Analytics does not upload files or content you enter in our tools.
Privacy Policy
Comments
0