Skip to content
Studio 3T - The professional GUI, IDE and client for MongoDB
  • Tools
    • Aggregation Editor
    • IntelliShell
    • Visual Query Builder
    • Export Wizard
    • Import Wizard
    • Query Code
    • SQL Query
    • Connect
    • Schema Explorer
    • Compare
    • SQL ⇔ MongoDB Migration
    • Data Masking
    • Task Scheduler
    • Reschema
    • More Tools and Features
  • Solutions
  • Resources
    • Knowledge Base
    • MongoDB Tutorials & Courses
    • Tool/Feature Documentation
    • Blog
    • Community
    • Testimonials
    • Whitepapers
    • Reports
  • Contact us
    • Contact
    • Sales Support
    • Feedback and Support
    • Careers
    • About Us
  • Store
    • Buy Now
    • Preferred Resellers
    • Team Pricing
  • Download
  • My 3T
search

Studio 3T® Knowledge Base

  • Documentation
  • Tutorials
  • Workshops
Take the fastest route to learning MongoDB. Cover the basics in two hours with MongoDB 101, no registration required.
Start the free course

How to Connect to MongoDB Atlas

Posted on: 24/09/2020 (last updated: 09/03/2022) by Kathryn Vargas

What is MongoDB Atlas?

MongoDB Atlas is MongoDB’s own fully-managed global cloud database-as-a-service, which can be run on Amazon Web Services (AWS), Google Cloud Platform, or Microsoft Azure.

In this post, we’ll show you how to connect to MongoDB Atlas, MongoDB’s fully-managed DBaaS, using Studio 3T.

Don’t have a MongoDB Atlas account? Here’s a tutorial on how to set up a free M0 cluster.

If you’re having issues connecting to MongoDB Atlas, we recommend our troubleshooting guide instead.

Prerequisites

  1. Get your first MongoDB Atlas cluster for free.
  2. Download the latest Studio 3T version on your Windows, Mac, or Linux machine.
What’s included in a free MongoDB Atlas cluster?

The free cluster includes:

  • 512 MB of storage
  • Shared RAM
  • Highly available replica sets, end-to-end encryption, automated patches, REST API
  • Max connections: 100
  • Network performance: Low
  • Max databases: 100
  • Max collections: 500

The free tier cluster regions available are:

  • N. Virginia (us-east-1)
  • Frankfurt (eu-central-1)
  • Singapore (ap-southeast-1)
  • Mumbai (ap-south-1)

1. Get the connection string from MongoDB Atlas

Log in to your MongoDB Atlas account. This will take you to your Clusters overview.

Click on Connect.

Click on Connect in the Clusters overview

Choose Connect Your Application.

Choose Connect Your Application

Choose your driver and driver version. We use Java and Version 3.7 or later in this example, but the latest version of any driver should also generate a compatible connection string.

Choose the MongoDB driver and version

Copy the generated connection string. This is what you’ll need to paste in Studio 3T.

Copy the MongoDB Atlas connection string

2. Whitelist your IP address

If you have a dynamic IP address – which most of us do – it’s worth double-checking the MongoDB Atlas IP Whitelist tab.

Click on Network Access under the Security tab on the left-hand sidebar. This will take you to the IP Whitelist tab.

Click on Add IP Address in the top-right corner. This will open the Add IP Whitelist Entry dialog.

MongoDB Atlas IP whitelist tab

Click on Add current IP address. MongoDB will automatically detect your current address, then click Confirm.

Add current IP address in MongoDB Atlas

Are you connecting from another IP address, through a VPN, or getting errors? Troubleshoot MongoDB Atlas connection issues with our guide.

3. Connect to Studio 3T

Open Studio 3T and click on Connect in the top-left corner of the toolbar. This will open the Connection Manager.

Click on New Connection in the top-left corner, which will open a new connection window.

Name your connection and click on the From URI button.

Paste the connection string you copied from MongoDB Atlas.

Replace the placeholder “<password>” with your actual password and “<dbname>” with the name of the database that connections will use by default. Make sure to replace the brackets too, and click OK.

Paste the MongoDB connection string

Studio 3T will automatically extract the information and pre-populate the fields in the Server, Authentication, SSL, SSH Tunnel, and Advanced tabs. It will also save the connection for later use.

Click through the Server, Authentication, SSL, and SSH Tunnel tabs and verify that the information is correct.

Click on Test Connection. A successful test will look like this:

Test MongoDB Atlas connection

Click Save. Then click Connect.

If you’re getting a connection error, e.g. Prematurely reached end of stream, make sure your IP address has been whitelisted on MongoDB Atlas.

4. Import data in JSON, CSV, BSON/mongodump or SQL

If you have an empty cluster, you can easily import JSON, CSV, BSON/mongodump or SQL to MongoDB with Studio 3T’s Import Wizard:

  • Import JSON to MongoDB
  • Import CSV to MongoDB
  • Import BSON/mongodump to MongoDB
  • Import SQL to MongoDB

5. Explore MongoDB data

Click on a collection in the Connection Tree to open a Collection Tab, which is the starting point of all data exploration in Studio 3T.

Here you can view the contents of your MongoDB collection in either Table View, Tree View, or JSON View:

Easily edit data in Table, Tree, and JSON view.

Or access the Visual Query Builder, a drag-and-drop MongoDB query builder ideal for both newcomers and pros:

Once you’ve built your query, click on Query Code tab to see how it translates to Java, Node.js, PHP, C#, Python, Ruby, and the mongo shell language:

And that’s just one way of querying data in Studio 3T. There’s also IntelliShell, the built-in mongo shell with robust auto-completion; Aggregation Editor, the stage-by-stage aggregation query builder; and SQL Query, which lets you write SQL to query your MongoDB database.

Related reading

  • A roundup of the best MongoDB Atlas tools for data migration, data modeling, performance tuning, and more
  • Tips on how to reduce your MongoDB Atlas monthly bill
  • Find MongoDB tutorials on the Studio 3T Knowledge Base
  • Pressed for time? Subscribe to the Studio 3T YouTube Channel for quick MongoDB tips, tricks, and how-tos

How helpful was this article?
This article was hideous
This article was bad
This article was ok
This article was good
This article was great
Thank you for your feedback!

About The Author

Kathryn Vargas

When she's not writing about working with MongoDB, Kathryn spends her free time exploring Berlin's food scene, playing the drums, learning languages (current mission: German), and hiking.

Article navigation

Related articles

  • How to Connect to the License Manager Through a Proxy Server
  • How to Connect to Amazon DocumentDB With Studio 3T
  • How to Fix MongoDB Atlas IP Whitelisting Issues
  • Detecting COVID-19 Trends Using MongoDB Atlas Data
  • 5 Best Tools for MongoDB Atlas in 2021

Studio 3T

MongoDB Enterprise Certified Technology PartnerSince 2014, 3T has been helping thousands of MongoDB developers and administrators with their everyday jobs by providing the finest MongoDB tools on the market. We guarantee the best compatibility with current and legacy releases of MongoDB, continue to deliver new features with every new software release, and provide high quality support.

Find us on FacebookFind us on TwitterFind us on YouTubeFind us on LinkedIn

Education

  • Free MongoDB Tutorials
  • Connect to MongoDB
  • Connect to MongoDB Atlas
  • Import Data to MongoDB
  • Export MongoDB Data
  • Build Aggregation Queries
  • Query MongoDB with SQL
  • Migrate from SQL to MongoDB

Resources

  • Feedback and Support
  • Sales Support
  • Knowledge Base
  • FAQ
  • Reports
  • White Papers
  • Testimonials
  • Discounts

Company

  • About Us
  • Blog
  • Careers
  • Legal
  • Press
  • Privacy Policy
  • EULA

© 2023 3T Software Labs Ltd. All rights reserved.

  • Privacy Policy
  • Cookie settings
  • Impressum

We value your privacy

With your consent, we and third-party providers use cookies and similar technologies on our website to analyse your use of our site for market research or advertising purposes ("analytics and marketing") and to provide you with additional functions (“functional”). This may result in the creation of pseudonymous usage profiles and the transfer of personal data to third countries, including the USA, which may have no adequate level of protection for the processing of personal data.

By clicking “Accept all”, you consent to the storage of cookies and the processing of personal data for these purposes, including any transfers to third countries. By clicking on “Decline all”, you do not give your consent and we will only store cookies that are necessary for our website. You can customize the cookies we store on your device or change your selection at any time - thus also revoking your consent with effect for the future - under “Manage Cookies”, or “Cookie Settings” at the bottom of the page. You can find further information in our Privacy Policy.
Accept all
Decline all
Manage cookies
✕

Privacy Preference Center

With your consent, we and third-party providers use cookies and similar technologies on our website to analyse your use of our site for market research or advertising purposes ("analytics and marketing") and to provide you with additional functions (“functional”). This may result in the creation of pseudonymous usage profiles and the transfer of personal data to third countries, including the USA, which may have no adequate level of protection for the processing of personal data. Please choose for which purposes you wish to give us your consent and store your preferences by clicking on “Accept selected”. You can find further information in our Privacy Policy.

Accept all cookies

Manage consent preferences

Essential cookies are strictly necessary to provide an online service such as our website or a service on our website which you have requested. The website or service will not work without them.

Performance cookies allow us to collect information such as number of visits and sources of traffic. This information is used in aggregate form to help us understand how our websites are being used, allowing us to improve both our website’s performance and your experience.

Google Analytics

Google Ads

Bing Ads

Facebook

LinkedIn

Quora

Hotjar

Reddit

Functional cookies collect information about your preferences and choices and make using the website a lot easier and more relevant. Without these cookies, some of the site functionality may not work as intended.

HubSpot

Social media cookies are cookies used to share user behaviour information with a third-party social media platform. They may consequently effect how social media sites present you with information in the future.

Accept selected