Firebase is a Backend-as-a-Service containing identity management, realtime data views and a document database . It runs in the cloud. MongoDB on the other hand is a full fledged database with a rich query language. In principle it runs on your own machine, but there are cloud providers.