About the MongoDB compiler
NoSQL document database. Runs on MongoDB Atlas cloud. Run MongoDB code in your browser with no install and no signup — the editor, the input and the output share one screen. MongoDB compiles and runs on your own device through WebAssembly, so once the page has loaded it keeps working without a network connection.
Press Run to execute the program, edit it and press Run again, or paste your own code over it. Everything you type stays in the page; the editor caches your work locally so a reload does not lose it.
A MongoDB example
This is the program the MongoDB editor opens with — run it as it is, then change it.
// MongoDB: NoSQL document database
// Insert documents
db.users.insertMany([
{ name: "Alice", age: 28, city: "NYC", skills: ["Python", "SQL"] },
{ name: "Bob", age: 32, city: "LA", skills: ["JavaScript", "React"] },
{ name: "Charlie", age: 25, city: "Chicago", skills: ["Go", "Docker"] }
]);
// Query with filter
db.users.find({ age: { $gte: 28 } });
// Aggregation pipeline
db.users.aggregate([
{ $unwind: "$skills" },
{ $group: { _id: "$skills", count: { $sum: 1 } } },
{ $sort: { count: -1 } }
]);
More Databases compilers
Browse all 109 languages — the same editor runs each of them, in the browser or on a shared runner.