Regex Tester
Test patterns against sample text with match highlighting, capture groups and a safe one-second timeout.
Developer Tools↑↓ to navigate · Enter to open · Esc to close
Format, validate, explore and compare JSON without sending a single byte to a server.
Runs in your browser. Nothing is uploaded — your input is processed on this device and discarded when you close the tab.
A note on sensitive data: everything on this page runs in your browser and nothing is uploaded — but treat pasted JSON the way you would in any tool. Do not paste live passwords, private keys or production tokens you would not want visible on your own screen, and follow your employer’s rules for production data.
The verdict will appear here, with basic statistics for a valid document or the exact line and column of the first problem.
The expandable tree will appear here. Objects and arrays can be opened and closed; values are labelled with their type.
Query matches will appear here as a JSON array.
Differences will be listed here, grouped as added, removed and changed, each with its JSON path.
The sample document describes a small bookshop: a store object holding a list of four books, a bicycle, staff members and some opening details, plus a small block of metadata. Select the button below to load it into the Format tab (and, to save you pasting twice, into the Tree and Query inputs as well). Format it with two-space indent and you get a neatly nested document you can read at a glance. Then open the Query tab, keep the suggested path $.store.book[0].title, and run the query: the result is a one-item array containing the first book’s title. Try changing the query to $.store.book[*].title to list every title, $..price to collect every price anywhere in the document, or $.store.book[?(@.price > 10)].title to find the titles of books costing more than ten. Finally, paste the sample into both Compare boxes, change one price in the second copy, and compare: the changed price is reported with its full path and its old and new values.
$.store.book[?(@.inStock == true)].title → ["Sayings of the Century", "Sword of Honour", "The Lord of the Rings"]
JSON — JavaScript Object Notation — is a text format for structured data. A document is built from only a few pieces: objects that pair quoted keys with values, arrays that hold ordered lists, strings in double quotes, numbers, and the three literal values true, false and null. Because the rules are so small, almost every programming language can read and write JSON, which is why it became the default language of web APIs, configuration files, data exports and log pipelines. When a phone app asks a server for the weather, a list of products or your account details, the reply is very probably a block of JSON travelling between the two.
The same strictness that makes JSON portable also makes it unforgiving. There are no comments, no trailing commas, no single-quoted strings and no unquoted keys, however natural those habits feel from ordinary programming. One missing comma in a three-thousand-line export makes the whole document unreadable to every standard parser, and the failure is usually reported by the receiving application, far from the place where the text went wrong. A developer then faces an unhelpful message in a production log and a large, densely packed document with no line breaks to search through. Formatting the document first — one value per line, with consistent indentation — turns that hunt into something a person can actually do, because structure you can see is structure you can reason about.
Validation, exploration and comparison answer the three questions that follow. Validation tells you whether a document obeys the grammar at all, and a good validator points at the first real problem instead of the place where a confused parser eventually gave up. A tree view and a query language let you explore a document you did not write: instead of reading every line, you expand the branches that matter or ask directly for every price, every error code or every item matching a condition. Comparison closes the loop when two versions of a document disagree — two API responses, a configuration before and after an edit, an expected and an actual test fixture — by listing exactly which paths were added, removed or changed, rather than leaving you to spot one altered number in two walls of text. Minifying, finally, is the reverse journey: once a document is correct and understood, stripping its whitespace shrinks it for storage or transport, with the size saving shown so you can judge whether it was worth doing.
Doing all of this in the browser is a deliberate choice. JSON documents routinely contain personal data, access tokens and internal system details, so pasting them into a server-side tool means trusting a stranger with their contents. Here the document never leaves your device, which makes the tool safe to use on real payloads, not just toy examples.
Most invalid JSON fails for a handful of familiar reasons. A comma after the last item in an object or array is the classic mistake, followed closely by a missing comma between two items. Strings and keys written with single quotes work in JavaScript source code but never in JSON. Keys must always be quoted, strings must be closed, and a value typed from habit — undefined, NaN or a date written without quotes — is not JSON at all. Raw line breaks typed inside a string also break the grammar; inside a string, a new line must be written as the escape sequence \n. The error box in each tab names the line and column of the first problem and adds a hint aimed at these causes, but remember that parsers stop at the first error: fixing it may reveal a second one further on, so validate again after every fix.
Error locations also deserve honesty. Browsers word their JSON errors differently, and some give no position at all. Where a browser reports a character position or a line and column, this tool uses it exactly. Where it does not, the tool scans the text for the first suspicious token and labels the location approximate — treat it as the neighbourhood of the problem, not a promise about the exact character.
The Repair button on the Format tab attempts the six mechanical mistakes that cause most failures: a byte-order mark at the start, JavaScript-style comments, single-quoted strings, unquoted keys, raw line breaks inside strings, and trailing commas. Repair is all-or-nothing: if the text still does not parse after those fixes, nothing is changed and the remaining error is reported instead. When repair succeeds it lists exactly which fixes were applied, and Undo restores your original text — but a repaired document can still be the wrong document (a guessed quote can change a value’s meaning), so read the result before you use it.
Size limits are as follows. Each input is limited to 5 MB, measured as UTF-8 bytes, and an input over the limit is refused with a message naming its size. Inputs over 1 MB are parsed, formatted, minified and validated in a background worker so the page does not freeze. In this version, the interactive tools — tree view, queries and compare — are limited to 1 MB; for a larger document you will be pointed back to Format, Minify and Validate, which handle the full 5 MB. The query tab implements a subset of JSONPath: the root symbol $, dot and bracket child access, array indexes, the [*] wildcard, .. recursive descent, and simple filters of the form [?( @.field == ’value’ )] supporting ==, !=, >, <, >= and <= against string, number, boolean and null values. Script expressions, unions, slices and length functions from fuller JSONPath dialects are not supported, and the tool says so rather than guessing. Finally, this tool works on values, not formatting style: key order inside objects is never treated as a difference, numbers that parse to the same value compare as equal, and duplicate keys inside one object keep the last value, exactly as the standard JSON parser in your browser handles them.
No. Every tab in JSON Studio runs entirely in your browser, including the background worker used for large documents. Your text is never sent over the network, stored, or kept after you close the tab. That makes the tool safe for API responses and configuration files that contain private data, although you should still follow your employer’s rules about handling production information on any website.
A parser reads until the grammar stops making sense, which is often one token after the real mistake. A missing comma on one line, for example, is usually reported at the first key or value on the next line, because that is where the parser expected the comma and failed to find it. When an error looks blameless, check the end of the previous line first. If your browser reports no position at all, the tool estimates one by scanning the text and clearly labels it approximate.
They travel in opposite directions. Format adds line breaks and consistent indentation so a person can read, search and debug the document, at the cost of a larger file. Minify removes every unnecessary space and line break so the file is as small as the grammar allows, which suits storage and transport but makes the text hard to read. Both produce documents with exactly the same data: formatting whitespace between tokens carries no meaning in JSON, and strings are never altered by either operation.
You can use the root symbol $, child access such as $.store.book or $['store']['book'], array indexes such as [0], the wildcard [*] to take every item in an array or object, and .. recursive descent such as $..price to collect a value wherever it appears. Simple filters are also supported, for example $.store.book[?(@.price > 10)] or [?(@.category == 'fiction')], using ==, !=, >, <, >= and <= with string, number, boolean or null values. More advanced dialect features — scripts, unions, slices and functions — are not supported and produce a clear error message instead of a silent wrong answer.
By default, arrays are compared position by position, so moving an item counts as changes at each affected index. With the option ticked, each array is treated as a collection of items regardless of order: the tool matches items between the two documents by their full contents, and only reports items that are genuinely missing or extra. Use it when order carries no meaning, such as lists of tags or permissions. Leave it unticked when order is part of the data, such as a ranked list or a sequence of steps.
Each input accepts up to 5 MB of JSON, measured in UTF-8 bytes. Documents over 1 MB are handled by a background worker for formatting, minifying and validation, so the tab stays responsive while they process. The tree view, query and compare tools are limited to 1 MB in this version, because building an interactive tree or difference list from a very large document can consume a great deal of memory; for larger files, a desktop editor or the jq command-line tool is the better instrument.
Test patterns against sample text with match highlighting, capture groups and a safe one-second timeout.
Developer ToolsCheck HSTS, CSP and other security headers, TLS details, and DNS/email authentication records (SPF, DKIM, DMARC).
Developer ToolsGenerate strong passwords with length and character-set controls, an honest entropy estimate and a session-only history.
Developer ToolsJSON syntax rules in plain language, a formatting workflow, and a gallery of 10 common errors — each one executed in Node against the JSON Studio validator code, with the line, column and hint it returned, and the fix that makes it parse.
Structural comparison beats text diff for JSON: key order is not a change, array order usually is, and a number that became a string is a real change. Worked pairs run through a structural differ, with the exact added, removed and changed paths it reported.
JSON-LD tells search engines what your page is in a format they can parse exactly. Working Article, BreadcrumbList and FAQPage examples — each one machine-validated — plus the eligibility limits most guides skip.