---
title: Online MongoDB Playground – Test Queries, Aggregations & Atlas Search
description: Free online MongoDB playground on a real cluster: run mongosh-style queries and aggregations, see query plans, try Atlas Search and Vector Search, share links. No sign-up.
---

# Online MongoDB Playground

**MongoDB Playground is a free online MongoDB playground: paste your own documents, run mongosh-style statements
(find, aggregate, update, delete, indexes, Atlas Search, Vector Search), read the query plan, and share the result
with a link. It runs on a real MongoDB Atlas cluster, needs no account and installs nothing.** Everything the web
app does is also available to scripts and AI agents through a REST API and an MCP server.

Open it: https://mongoplayground.com/

## What you can do

- Run **several mongosh-style statements** in order against documents you supply. Each run uses a throwaway database that is deleted afterwards.
- Put **documents, indexes, Atlas Search indexes and Vector Search indexes** in one data panel, per collection.
- Read **query plans** with plain-language advice (index used, documents examined, collection scans).
- **Share** a playground as a UUID link, or **export** it as a mongosh script, JSON, CSV or curl.
- Call everything from code: [REST API](https://mongoplayground.com/docs/api.md) and [MCP server](https://mongoplayground.com/docs/mcp.md).

## Example

Data panel:

```js
db = { collection: { documents: [
  { name: "Ada", age: 36 }, { name: "Linus", age: 55 }, { name: "Grace", age: 85 }
] } }
```

Shell panel:

```js
db.collection.find({ age: { $gt: 40 } })
```

Result: `Linus` and `Grace`.

## Limits

8 collections and 256 documents each, 32 MB per request,
10 s per statement, 3 indexes plus 1 Atlas Search and 1 Vector Search index per
collection, no cap on the number of results. `$where`, `$function`, `$out`, `$merge` and references to other
databases are rejected. Share links last 90 days after their last view.

## Frequently asked questions

**Is there a free online MongoDB playground?**
Yes. This one is free, needs no sign-up and runs on a real MongoDB Atlas cluster.

**How do I test a MongoDB query online without installing MongoDB?**
Open the playground, paste your documents in the Data panel, write a statement such as
`db.collection.find({ age: { $gt: 40 } })` in the Shell panel, and press Run all.

**How do I run an aggregation pipeline online?**
Write `db.collection.aggregate([ ... ])` in the Shell panel. Add `.explain()` or press Explain plan to see how
MongoDB runs it.

**Can I try Atlas Search or Vector Search without creating a cluster?**
Yes. Declare a `searchIndexes` or `vectorSearchIndexes` entry for a collection in the Data panel and use `$search`
or `$vectorSearch`. The first run is slower because the index has to build first.

**Is it a real MongoDB or a simulator?**
It is a real MongoDB Atlas cluster. Each run uses a throwaway database that is dropped when the run ends.

**Can an AI agent run MongoDB queries here?**
Yes. Use the MCP server at `https://mongoplayground.com/mcp` (tools: run_query, validate_query, explain_query, share_query,
get_shared, export_playground, list_examples, get_setup_guide, get_limits) or the REST API at `https://mongoplayground.com/api/v1`.

**How do I share a MongoDB query?**
Press Share. You get a link (a random UUID) to your data and statements, valid for 90 days after its last view.

## For agents

- Markdown version of every page: add `.md` to the path, or send `Accept: text/markdown`.
- [llms.txt](https://mongoplayground.com/llms.txt), [OpenAPI 3.1](https://mongoplayground.com/api/v1/openapi.json), [MCP card](https://mongoplayground.com/.well-known/mcp.json).
- Pages: [Quickstart](https://mongoplayground.com/docs/quickstart.md), [REST API](https://mongoplayground.com/docs/api.md), [MCP server](https://mongoplayground.com/docs/mcp.md), [Run it yourself](https://mongoplayground.com/docs/run-it-yourself.md), [About](https://mongoplayground.com/about.md).
- Source code: https://github.com/desteves/mongodb-playground

```json
{
  "@context": "https://schema.org",
  "@type": "WebApplication",
  "name": "MongoDB Playground",
  "url": "https://mongoplayground.com/",
  "applicationCategory": "DeveloperApplication",
  "operatingSystem": "Any (web browser)",
  "description": "Free online MongoDB playground on a real cluster: run mongosh-style queries and aggregations, see query plans, try Atlas Search and Vector Search, share links. No sign-up.",
  "isAccessibleForFree": true,
  "offers": {
    "@type": "Offer",
    "price": "0",
    "priceCurrency": "USD"
  },
  "sameAs": [
    "https://github.com/desteves/mongodb-playground"
  ],
  "featureList": [
    "mongosh-style shell with several statements per run",
    "Documents, indexes, Atlas Search and Vector Search indexes in one data panel",
    "Query plans with plain-language advice",
    "Share links and export to a mongosh script",
    "REST API and MCP server for AI agents"
  ]
}
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Is there a free online MongoDB playground?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. This one is free, needs no sign-up and runs on a real MongoDB Atlas cluster."
      }
    },
    {
      "@type": "Question",
      "name": "How do I test a MongoDB query online without installing MongoDB?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Open the playground, paste your documents in the Data panel, write a statement such as db.collection.find({ age: { $gt: 40 } }) in the Shell panel, and press Run all."
      }
    },
    {
      "@type": "Question",
      "name": "How do I run an aggregation pipeline online?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Write db.collection.aggregate([ ... ]) in the Shell panel. Add .explain() or press Explain plan to see how MongoDB runs it."
      }
    },
    {
      "@type": "Question",
      "name": "Can I try Atlas Search or Vector Search without creating a cluster?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. Declare a searchIndexes or vectorSearchIndexes entry for a collection in the Data panel and use $search or $vectorSearch. The first run is slower because the index has to build first."
      }
    },
    {
      "@type": "Question",
      "name": "Is it a real MongoDB or a simulator?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "It is a real MongoDB Atlas cluster. Each run uses a throwaway database that is dropped when the run ends."
      }
    },
    {
      "@type": "Question",
      "name": "Can an AI agent run MongoDB queries here?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. Use the MCP server at https://mongoplayground.com/mcp (tools: run_query, validate_query, explain_query, share_query, get_shared, export_playground, list_examples, get_setup_guide, get_limits) or the REST API at https://mongoplayground.com/api/v1."
      }
    },
    {
      "@type": "Question",
      "name": "How do I share a MongoDB query?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Press Share. You get a link (a random UUID) to your data and statements, valid for 90 days after its last view."
      }
    }
  ]
}
```
