Loading MongoDB to DynamoDB Converter...
Please wait a moment

MongoDB to DynamoDB Converter Online — Migrate NoSQL Queries Between Databases

Paste your MongoDB query above and get the equivalent AWS DynamoDB operation instantly. Handles find(), aggregate(), insertOne(), updateMany(), deleteOne(), and more — everything runs in your browser.

How to Convert MongoDB to DynamoDB — Step-by-Step

Step 1

Input Your MongoDB Query

Migrating from MongoDB to AWS DynamoDB? Paste your MongoDB query directly — the converter handles both MongoDB shell syntax (unquoted keys) and strict JSON format.

Paste directly: Copy your MongoDB query from MongoDB Compass, your shell, or application code
Upload a file: Click "Upload" to select a .js or .json file
Load a sample: Click "Sample" to see a MongoDB find() with filters converted to DynamoDB

Example: MongoDB find() Query

A typical MongoDB query with comparison and regex operators:

db.users.find(
  {
    "status": "active",
    "age": { "$gte": 21 },
    "country": { "$in": ["US", "UK"] }
  }
)
Step 2

Automatic Conversion to DynamoDB

The converter maps MongoDB query operators to their DynamoDB equivalents:

Operators: MongoDB $gt, $gte, $lt, $ne, $in become DynamoDB comparison expressions
Typed values: Strings become {"S": "value"}, numbers become {"N": "42"}, matching the DynamoDB data type format
Ready-to-use: Output includes complete params object and AWS SDK v3 command call

Example: DynamoDB Scan Output

The MongoDB query above converted to a DynamoDB Scan:

const params = {
  "TableName": "users",
  "FilterExpression": "#status = :val0 AND #age >= :val1 AND #country IN (:val2, :val3)",
  "ExpressionAttributeNames": { ... },
  "ExpressionAttributeValues": { ... }
};
Step 3

Copy or Download Your DynamoDB Code

When it looks right, grab it:

Copy to clipboard: One click — paste into your Lambda function, Node.js app, or AWS CLI script
Download as file: Save as a .js file for your project
Try other converters: Convert to SQL instead, or go the other way with SQL to DynamoDB. Format your MongoDB queries with the MongoDB Query Formatter

Frequently Asked Questions — MongoDB to DynamoDB

How do I convert MongoDB to DynamoDB online?

Paste your MongoDB query into the input editor and the converter generates the equivalent DynamoDB operation instantly. It handles find(), findOne(), aggregate(), insertOne(), insertMany(), updateOne(), updateMany(), deleteOne(), deleteMany(), and countDocuments(). No account needed.

What MongoDB operators are supported?

All major comparison operators: $eq, $ne, $gt, $gte, $lt, $lte, $in, $regex, and $exists. Logical operators $and and $or are also supported.

Does it handle MongoDB aggregation pipelines?

Partially. The converter handles $match, $project, and $limit stages directly. For stages without a direct DynamoDB equivalent ($group, $lookup, $unwind), it adds a note explaining that these need to be handled in your application code — since DynamoDB is a key-value store, not a document database.

What are the main differences between MongoDB and DynamoDB?

MongoDB is a document database with flexible querying, while DynamoDB is a key-value / wide-column store optimized for specific access patterns. MongoDB supports JOINs via $lookup, rich aggregation pipelines, and ad-hoc queries. DynamoDB requires you to design your table around your access patterns, uses partition/sort keys, and has limited filtering capabilities. That is why some MongoDB operations do not have a one-to-one DynamoDB equivalent.

Is my data safe?

Your MongoDB queries are processed entirely in your browser — nothing is sent to any server. The conversion is 100% client-side.

Is this MongoDB to DynamoDB converter free?

Completely free, no account needed, no limits. Also check out our other NoSQL tools: SQL to MongoDB, MongoDB to SQL, SQL to DynamoDB, DynamoDB to SQL, and MongoDB Query Formatter.