A step-by-step guide

What is geocoding?
Geocoding is the process of converting addresses into geographic coordinates (latitude and longitude). We can use these coordinates to map the locations spatially.
That’s geocoding. If you’ve ever used Google Earth to search for an address, it will take you to that spot. It’s converting a text-based address to coordinates on a map, which we can see in the window’s bottom right corner.
Why we have to Geocode?
One common application is when people receive a list of addresses to send out for a survey or if you receive a list of addresses for a specific sort of business and want to map those addresses. So, you’ll need to geocode in bulk. You don’t have to look up just one address. You must look for number of addresses and return them as a data layer.
How can we Geocode?
There is a variety of geocoding data sources available. Most of them are for payment however, there are a few that are available for free. We can utilize an ArcGIS Online world geocode service, but it requires credits, which means you must have an organizational account, which means you must be a member of an organization that pays for ArcGIS Online.
Google Maps can geocode locations all around the world. It’s easy to plot a single location. In Google Maps, we can enter your search term in the search box. Google will plot any address, zip code, or another form of location for you in a matter of seconds. Right-click on a map marker to see the GPS coordinates for that location. Unfortunately, you can only geocode one address at a time with the free edition. You’ll have to sign up for Google Maps Platform, which is a commercial service if you need a batch geocoder. Google’s Geocoding API uses a pay-as-you-go pricing model.

Some other free options are also available like Maptive, PostionStack and all. But there are limitations.
If we want a free and simple geocoding solution, QGIS might be the way to go.
This open-source software has two geocoding plugins: GeoCoding Plugin (for geocoding one address at a time) and MMQGIS (for geocoding multiple addresses at once)
For the vast majority of users, the MMQGIS plugin is the best choice. To view all of your addresses mapped on a map, simply enter them. Although not as comprehensive as some commercial tools, it’s a fine choice if you only need to geocode a few addresses quickly. It can geocode 250 places at once without crashing your computer. It is possible that it will not respond if we load larger files. For quick results, we can geocode in batches.
Stepwise procedure to Geocode in QGIS
Step 1: Prepare a CSV (Comma Separated Values)File
If you have a list of addresses in an Excel file, clean it up and divide it into fields using the appropriate functions. Text to columns is a excellent tool for this, as it allows us to divide the addresses into fields. Since the same street names may exist in different countries, we should include City, State, and Country columns as a must. The column names should appear on the first line of the CSV file. Save the data into a.CSV file once it’s finished. You can alternatively keep the data in a notepad or WordPad and separate the addresses with commas, however misinterpretation of the data is possible sometimes. If you are using Excel, then better prepare your file in it, and it is the best choice.

Step 2 :Install QGIS.
Even if you use ArcGIS, having QGIS as an open-source platform is only beneficial. You can also get a lot of help from the community. When working with an ArcGIS account that isn’t organizational, QGIS comes in handy.
You can download the latest version of QGIS from here.
Step 3: Adding the MMQGIS Plugin

After installing QGIS, open the “Plugins” menu and select the manage and install plugins.

This will open the window below, with a search toolbar. In the search toolbar, enter “mmqgis.” This will bring you the option to install the plugin. The MMQGIS plugin will be added to the Menu bar once it is installed.

Step 4 : Geocode CSV with web service

Choose Geocode CSV using web service from the MMQGIS drop-down menu. A window similar to the one below will pop up.

Select your CSV file, and the address, city, state, and country fields will be assigned automatically; if your field is different, select the appropriate fields from the selection. (As you can see in the image below, I assigned the Province field to the State Tab because that was the name of my States field.)
Select “OpenStreetMap/ Nominatim” from the web service tab now. We have the option of using “ESRI server” or “US Census Bureau” here.

Then for the resulting shape file, set the appropriate Output file location. You must also create a CSV file to store the points for which the geocoding failed. A mistake will occur if you do not do so. After you’ve set all of the parameters, click “Apply” to begin geocoding.

Geocoding is successful for 249 of the 250 locations. Only one address failed, and the details of that location would be in the file name we specified in the “Not found Output list” (Refer to the pic above, the last item). My points are already on my map, and the shape file is in the left-hand layers panel.
If you’re using QGIS, you can use this layer as is, but if you’re using ArcGIS or another mapping solution, right-click the newly created layer in the layer panel and choose the export option, to save the file as a shape file.
If you’re using QGIS, you can use this layer as is, but if you’re using ArcGIS or another mapping solution, right-click the newly created layer in the layer panel and choose the export option to save the file as a shape file.

Before we leave, I’d want to point out that there’s also a technique known as “Reverse geocoding”. If geocoding is the way of acquiring coordinates from addresses, reverse geocoding is the process of obtaining coordinates from addresses.