MongoDB Query Builder
Build MongoDB queries visually with AND/OR/NOR grouping, $eq/$ne/$gt/$gte/$lt/$lte/$in/$nin/$regex/$exists/$type/$size/$mod/$not operators, projection, sort, limit, skip, and operation modes (find / findOne / insertOne / updateMany / updateOne / replaceOne / deleteMany / deleteOne). Generates MQL JSON, mongosh, and driver code for Node, Python, Java, C#, and PHP. Runs an in-browser MQL filter engine against pasted sample documents. 100% client-side.
About MongoDB Query Builder
Build MongoDB queries visually with AND/OR/NOR grouping, $eq/$ne/$gt/$gte/$lt/$lte/$in/$nin/$regex/$exists/$type/$size/$mod/$not operators, projection, sort, limit, skip, and operation modes (find / findOne / insertOne / updateMany / updateOne / replaceOne / deleteMany / deleteOne). Generates MQL JSON, mongosh, and driver code for Node, Python, Java, C#, and PHP. Runs an in-browser MQL filter engine against pasted sample documents. 100% client-side. Everything runs locally in your browser — your data never leaves your device.
How to use
- Enter your input in the tool above.
- Adjust any options to your preference.
- Use the Copy or Download buttons to save the result.
- Everything happens locally — your data never leaves your browser.
FAQ
Which MongoDB operators does this builder support?
All common comparison operators ($eq, $ne, $gt, $gte, $lt, $lte), array operators ($in, $nin, $all via $in), $regex, $exists, $type, $size, $mod, $not, plus $and / $or / $nor logical grouping with unlimited nesting. Each condition is type-aware — strings, numbers, booleans, null, ObjectId (24-hex), and ISODate are emitted as proper Extended JSON ($oid / $date) and mongosh literals (ObjectId(...) / ISODate(...)).
What does the tool export?
Six formats: (1) clean MQL JSON (filter + projection + sort + limit + skip); (2) mongosh one-liner; (3) Node.js driver code with MongoClient; (4) Python (PyMongo) with sort/limit/skip chained; (5) Java driver code using Document.parse; (6) C# .NET with BsonDocument.Parse; (7) PHP driver code. All of find, findOne, insertOne, updateMany/One, replaceOne, deleteMany/One are covered.
Can I test my query against sample documents?
Yes. Paste an array of JSON documents into the sample-documents panel and the in-browser MQL filter engine runs your filter against them in real time. The engine supports dot-notation field access (including array-of-objects), $and/$or/$nor, and all the comparison operators. Matched documents are highlighted; counts and per-doc errors are shown.
Are my queries or sample documents uploaded anywhere?
No. This is a 100% client-side tool — your queries, sample documents, and history never leave the browser. History (last 20 builds) is stored in localStorage on this device only, and the shareable-URL encodes the full query state in the URL fragment (after #), which browsers never send to servers.
What extra features does this tool have versus others?
(1) 14 query operators + 3 logical groupings with unlimited nesting. (2) 8 operation modes (find / findOne / insertOne / updateMany / updateOne / replaceOne / deleteMany / deleteOne). (3) 6 driver code exports. (4) Type-aware values (string / number / boolean / null / ObjectId / ISODate) with Extended JSON + mongosh literals. (5) Projection (include/exclude). (6) Multi-field sort. (7) Limit + skip. (8) In-browser MQL filter engine on pasted sample docs. (9) Dot-notation field access. (10) Field autocomplete extracted from sample docs. (11) Field-name validation. (12) JSON doc validation for inserts/updates. (13) localStorage history (max 20). (14) Shareable URL with full state. (15) Update-operator doc editor ($set, $unset, $inc, $push, $pull).
Related tools
.bashrc / .zshrc Alias & Config Manager
Build shell aliases, functions, exports, and PATH edits in a visual editor, then export a clean, commented .aliases file sourced from both .bashrc and .zshrc — with shadowing detection against shell builtins and common CLI tools, function suggestions when args are needed, starter packs (git, docker, kubectl, navigation, safety, ls, dev, devops, data science), import of existing rc files, dedupe, history (localStorage), and shareable URL. 100% client-side.
Add / Subtract Date Calculator
Add or subtract years, months, weeks, days, hours, minutes and seconds from a starting date/time. Calendar-day or business-day mode with custom weekend + holiday list. Month-end policy toggle (clamp to last day vs overflow). Repeat/series mode (e.g. every 2 weeks x 10) with CSV export. Shareable URL. 100% client-side.
Age Calculator
Calculate exact age from a birth date in calendar years/months/days (no negative-day bugs) plus totals in months/weeks/days/hours/minutes/seconds. Next-birthday countdown with weekday. Feb-29 birthday policy toggle. Milestones (1,000 days, 10,000 days, 1 billion seconds). Zodiac sign + Chinese zodiac. Age gap comparison. Shareable URL. 100% client-side.