NoSQL Playground

Practice document-database queries the way you'd write them against MongoDB — filter, sort, insert, update and delete — against sample data, right here in your browser. Build a query by clicking, or write the real syntax yourself.

Match documents where…

Try:
This runs:
Run a query to see results here.
// results will appear here

About the NoSQL Playground

NoSQL document databases like MongoDB store data as flexible JSON-like documents instead of fixed rows and columns. This playground runs a real in-browser document database and lets you query it using the same operators and syntax you'd use against MongoDB — $gt, $in, $regex, $set and more — so what you practice here transfers directly.

Start with the visual builder

Pick a field, an operator and a value, and the matching query is written for you underneath. It's the fastest way to see how a plain-English filter turns into real query syntax.

Switch to writing queries

Once the syntax feels familiar, flip to "Write query" and type it yourself. Insert, update and delete always use the code editor, since that's how you'd write them in practice.

Bring your own data

Import any JSON array of objects as a new collection, or reset a sample collection back to its original documents at any time.

Command reference

Every button in the tool above maps to one of these real MongoDB-style commands.

CommandExampleWhat it does
find db.users.find({ age: { $gt: 30 } }) Returns every document that matches the filter. An empty filter {} returns everything.
insertOne db.users.insertOne({ name: "Ava" }) Adds a single new document to the collection.
insertMany db.users.insertMany([{...}, {...}]) Adds several documents in one go, from an array.
updateOne db.users.updateOne({ id: 1 }, { $set: { age: 30 } }) Finds the first document matching the filter and changes only the fields listed in $set.
updateMany db.users.updateMany({ active: false }, { $set: { active: true } }) Applies the same field changes to every matching document.
deleteOne db.users.deleteOne({ id: 1 }) Removes the first document that matches the filter.
deleteMany db.users.deleteMany({ active: false }) Removes every document that matches the filter.

Operator reference

Use these inside a filter or the visual builder to narrow down which documents match.

OperatorExampleMeaning
$eq { age: { $eq: 30 } } Equal to. Shorthand: { age: 30 }.
$ne { age: { $ne: 30 } } Not equal to.
$gt / $gte { age: { $gt: 30 } } Greater than / greater than or equal to.
$lt / $lte { age: { $lt: 30 } } Less than / less than or equal to.
$in { city: { $in: ["Delhi", "Pune"] } } Matches if the field equals any value in the list.
$regex { name: { $regex: ["ava", "i"] } } Field contains the given text. The "i" flag ignores case.
$exists { phone: { $exists: false } } Matches documents where the field is present (true) or missing (false).
$and / $or { $and: [{ age: { $gt: 20 } }, { city: "Delhi" }] } Combine multiple conditions — all must match, or at least one must match.

Frequently asked questions

Is this really MongoDB?

Not quite — there's no way to run the actual MongoDB server in a browser tab. This playground uses an in-memory document database that understands the same query operators, so the syntax you practice is genuinely the same, even though it isn't the MongoDB binary itself.

Is my data uploaded anywhere?

No. Everything — the sample data, anything you import, and every query you run — stays in your browser's memory. Nothing is sent to a server.

Does my data persist if I refresh the page?

No. Refreshing resets everything back to the original sample collections. Export or copy anything you want to keep before you leave the page.

What query operators are supported?

The visual builder covers the operators you'll use most often: equals, not equals, greater/less than, one of a list, contains text, and exists. The code editor accepts any valid query object, including $and, $or and $not.

Can I use my own data instead of the samples?

Yes. Use "Import JSON" and select a file containing a JSON array of objects. It becomes a new collection you can query the same way as the sample data.