Aggregation Pipeline Builder
Build MongoDB aggregation pipelines visually. Add stages, preview intermediate results, and export the finished pipeline — all inside a native macOS interface.
Why a Visual Pipeline Builder?
Aggregation pipelines are one of MongoDB's most powerful features, but writing them by hand is tedious. You need to keep the stage order in your head, guess at intermediate results, and debug by adding and removing stages one at a time.
Mongon's pipeline builder gives you a visual canvas where each stage is a discrete block. You can see what each stage does to your data before running the full pipeline.

Stage-by-Stage Preview
Click on any stage in the pipeline to see the intermediate output at that point. This lets you understand exactly how your data transforms at each step — without running the full pipeline or adding temporary stages.
- Click stage 1 — see which documents pass the $match filter
- Click stage 2 — see the grouped results after $group
- Click stage 3 — see the reshaped documents after $project
This makes debugging pipelines straightforward. If a stage produces unexpected output, you know exactly where the problem is.
14 Supported Stages
Mongon supports all the stages you need for real-world aggregation work:
| Stage | Description |
|---|---|
$match | Filter documents by a condition. Works like find() but inside the pipeline. Place it early to reduce the number of documents flowing through subsequent stages. |
$group | Group documents by a key and apply accumulators like $sum, $avg, $max, $min, $push, and $addToSet. The foundation of most analytics queries. |
$project | Reshape documents by including, excluding, or computing new fields. Use expressions to transform values, rename fields, or extract nested data. |
$lookup | Perform a left outer join with another collection. Bring related data into the pipeline without leaving the aggregation context. |
$unwind | Deconstruct an array field into one document per element. Commonly paired with $group to aggregate across array items. |
$sort | Order documents by one or more fields. Supports ascending (1) and descending (-1) sort directions. |
$limit | Restrict the pipeline output to the first N documents. Useful for top-N queries and pagination. |
$skip | Skip the first N documents. Commonly used with $sort and $limit for offset-based pagination. |
$count | Return a single document with a count of all documents that reach this stage. A quick way to get totals. |
$addFields | Add new fields to documents without removing existing ones. Useful for computed values, defaults, and enriching data mid-pipeline. |
$replaceRoot | Promote a nested document or expression to the top level. Replace the entire document structure with a subdocument or merged result. |
$sample | Return a random selection of N documents. Useful for testing, sampling data, and randomized queries. |
$out | Write the pipeline output to a new or existing collection. Replaces the target collection entirely. Use for materialized views and ETL. |
$merge | Merge pipeline output into an existing collection. More flexible than $out — supports insert, merge, replace, and fail-on-match strategies. |
Date Macros in Pipelines
Mongon's date macros work inside aggregation pipelines, not just in the query builder. Use them in any stage that accepts date values:
This is especially useful for analytics pipelines where you regularly aggregate data over the last week, month, or quarter. Save the pipeline and it always operates on the correct date range.
How to Build a Pipeline
Open the pipeline builder
Select a collection and switch to the Aggregation tab. You start with an empty pipeline.
Add a stage
Click the add button to insert a new stage. Choose from the 14 supported stage types. Each stage has a dedicated editor with syntax highlighting.
Write the stage body
Enter the stage document in the editor. Full autocomplete, bracket matching, and date macro support are available.
Preview intermediate results
Click on any stage to see the output at that point. The preview runs only the stages up to and including the one you clicked.
Reorder, disable, or remove stages
Drag stages to reorder them. Toggle a stage off to temporarily exclude it without deleting. Remove stages you no longer need.
Run or export
Run the full pipeline to see the final results. Copy the raw MongoDB query or export the pipeline as a code snippet.
Export Your Pipeline
When your pipeline is ready, you can copy the raw MongoDB query to paste into the shell, driver code, or any other tool. The export preserves the exact stage structure and all options.
Common Use Cases
- Analytics — group orders by month, sum revenue, compute averages
- Reporting — reshape data for export with $project and $addFields
- Data migration — transform and write to a new collection with $out or $merge
- Joins — combine data from multiple collections using $lookup and $unwind
- Debugging — use stage preview to understand how your data flows through the pipeline
Premium Feature
The aggregation pipeline builder is part of the Mongon premium plan. Premium is available as a one-time purchase or subscription (with a 2-week free trial). It also unlocks unlimited connections, 15 themes, export/import, change streams, CloudKit sync, and copy database.