MongoDB Explorer

Explore a MongoDB document or collection sample and infer its field schema and types.

Your MongoDB documents are parsed and analyzed locally in your browser; nothing you paste leaves your device or is uploaded to a server.

Need TypeScript types from this sample? Try JSON to TypeScript.

About MongoDB Explorer

This mongodb schema explorer takes a single MongoDB document or an array of documents as JSON and infers the underlying field schema for you. Paste a sample from Compass, mongosh, or an application log and it walks every document, builds a flat list of field paths (including nested objects and array-of-object elements), labels each with a loose BSON-ish type such as int, double, string, bool, object, array, or null, and shows how many documents in the sample contain each field. It is built for backend developers, data engineers, and QA testers who need to understand a collection's shape, spot optional or inconsistent fields, and document a schema quickly. Everything runs locally in your browser, so the documents you paste never leave your device and nothing is uploaded to a server.

Features

How to use the MongoDB Explorer

  1. Paste a MongoDB document or an array of documents as JSON into the input box.
  2. Read the inferred schema table on the right, with field paths, types, and coverage.
  3. Check the present/total count beside each field to find optional or sparse fields.
  4. Expand nested paths and array fields to see deep structure.
  5. Copy or download the normalized JSON to share the sample.

Example

Input

[
  { "_id": 1, "name": "Ada", "age": 36, "roles": ["admin"] },
  { "_id": 2, "name": "Linus", "active": true, "address": { "city": "Helsinki" } }
]

Output

_id        int        2/2
active     bool       1/2
address    object     1/2
address.city string   1/2
age        int        1/2
name       string     2/2
roles      array      1/2

Two documents inferred into field paths, types, and per-field coverage.

Common errors & troubleshooting

Frequently asked questions

What is the MongoDB schema explorer?
It is an in-browser tool that takes a MongoDB document or a sample array of documents as JSON and infers the schema: every field path, a BSON-ish type for each, and how many documents in the sample contain that field.
How does it infer field types?
It inspects each value and assigns a loose BSON-ish label: integers become int, non-integers become double, plus string, bool, object, array, and null. When documents disagree, the field shows every type it saw joined with a pipe.
Does it handle nested objects and arrays?
Yes. Nested objects produce dotted paths like address.city, and arrays of objects are explored through their first element using a path[].field notation.
What does the count next to each field mean?
It is the field's coverage, shown as present/total, meaning how many documents in your pasted sample include that field. A value below the total flags an optional or sparse field.
Can I paste extended JSON from mongosh or Compass?
Paste standard JSON. Replace constructors such as ObjectId(), ISODate(), and NumberLong() with plain values first, otherwise JSON parsing will fail.
Is my data safe when I use this MongoDB schema explorer?
Yes. The explorer runs entirely in your browser, so the documents you paste never leave your device and nothing is uploaded to a server.

Related tools

All ArrayKit tools