# import csv/tsv file into db 'users' collection 'contacts' on local MongoDB (default port)
mongoimport --db users --collection contacts --type csv --headerline --file contacts.csv
# import csv/tsv file - short params version
mongoimport -d users -c contacts --type csv --headerline --file contacts.csv
# import json file
mongoimport --db users --collection contacts --file contacts.json
# specify server, port, credentials
mongoimport --host mongodb1.example.net --port 37017 --username user --password pass -c contacts -d marketing --file data.json