Shapefile loader in pgAdmin 4

I also had to upload a shapefile to postgresql and found this solution perfect. Navigate to the given path

"C:\Program Files\PostgreSQL\9.6\bin\postgisgui"

Run the gui file "shp2pgsql-gui.exe"and a PostGIS Shapefile Import/Export Manager will appear. Here you can import shapefile from a specified path.


Another option (for MacOS) is to download the Opengeo Suite 4.8 from here http://mac.softpedia.com/get/Developer-Tools/OpenGeo-Suite.shtml.

Then only pull the PostGIS Utilities to your applications folder. You can then delete the pgAdminIII App and just use the pgShapeLoader. Works with pgAdmin4 too.
After that, follow instructions from this Boundless tutorial:
http://postgis.net/workshops/postgis-intro/loading_data.html

I don't know if or how this is working for Windows.
I am running postgres 10.4 with pgAdmin4 on MacOS 10.13.


The other answers on this question so far doesn't cover the linux case. So, for linux users and in general for all other platforms, we can use QGIS to import shapefile to PostGIS or anyother spatial database.

Open QGIS, In top navigation bar, choose Database from the menu, select DB Manager.

Simply, connect to your database and choose import Layer/file option to import shapefile to database

option to connect to database and import shapefile

original answer can be found here