How to Convert NoData to Zero for Raster Cells in ArcGIS

nodata to zero

Last Updated: Feb 23, 2018 @ 5:46 am

Change raster cell values from NoData to Zero in ArcGIS?

Going from NoData to Zero can be done in several ways in ArcMap.

Let’s say that you have three raster datasets.

You want to calculate statistics by using the sum function with raster calculator.  If one of the raster datasets containing NoData values, this may give you erroneous raster calculator values. In this case, you may want to change NoData values to 0.

Two ways to change NoData to zero in ArcGIS are as follows:

Reclassify Tool

You can convert no data to zero is by using the “Reclassify Tool”. This tool also requires the spatial analyst extension in ArcGIS.  

This tool allows you to change old raster values to new raster values. The best part is that you can reclassify a range of values.

To go from no data to zero, enter “NoData” in the old value field, and enter a new value of zero.

Con Tool

*You may want to try the method above as the Con Tool may not return the correct output

With the spatial analyst extension, you can use the “Con Tool”, which stands for “conditional”. The Con Tool performs a conditional if statement evaluation on each gridcell of a raster dataset.  

This function will allow you to replace NoData values with 0 values, with the condition “Value = NoData”.

Con Tool - Raster No Data
Con Tool (Spatial Analyst)

The Reverse: Set Null Tool

Here’s an example of changing raster values to “NoData” using the Set Null Tool:

We have a flow direction raster data set. Let’s change all values of 4 to NoData. How would we do that?

Flow Direction
Flow Direction

Under Spatial Analyst Tools > Conditional, double-click the Set Null tool. The “Input Conditional Raster” will be your the raster you want to set null. The “Input False Raster or Constant Value” will be the same raster. The expression will determine which values you will want to make null in your dataset.

Here’s an example of using the “Set Null” tool:

Set Null Tool
Set Null Tool

The result of using this tool will turn all values of 4 as “No Data” as seen below:

Flow Direction Null
Flow Direction Null


  1. Neither Reclass nor Con work for large raster datasets. Testing implies that it is related to the number of pixels for a certain value. For example, if the result of the tool creates a raster with about 2 billion pixels (I forget the number but it’s around that) for a specific value, the statistics will fail, the attribute table will fail and the result will be erroneous.

Leave a Reply

Your email address will not be published.