If I have a shapefile or geodatabase featureclass that has fields that I want to permanently reorder, is there a tool, script, or utility that will help me quickly accomplish this task?

Generally I know you have to create a new field, then populate it with the old values, then delete the old field. I am hoping there is something already created out there that will help with this. Assuming you don't have FME or another ETL tool available, what is the next best suggestion?

This is NOT a view level change (ie- drag/drop the fields in order), but rather write out to a new shapefile or featureclass. Thanks.

  • I find it hard to believe, but I can't find a way to do this. What's your use case for needing to re-order fields? Re-ordering fields on the fields tab of the layer properties in ArcMap isn't a solution? – Derek Swingley Feb 7 '11 at 20:16
  • 2
    The reordering of the fields is because the data will not be used in ArcMap, but with a less-sophisticated mapping software that 1) uses shapefiles and 2) does not allow for reordering on the client side and 3) the client needs to see the key attributes show up at the top of the "identify" tree. – RyanDalton Feb 7 '11 at 20:32
  • Just edited my previously deleted answer. Hopefully you're not scared of the command line ;). – Derek Swingley Feb 7 '11 at 21:23
  • same question? gis.stackexchange.com/questions/5839/… – SaultDon Feb 7 '11 at 22:17
  • 2
    @SaultDon- this is not the same question. You referenced a question that wants to sort RECORDS (rows), but I want to sort FIELDS (columns). – RyanDalton Feb 7 '11 at 23:01

14 Answers 14


I'm pretty sure you can do this with Feature Class to Feature Class by re-ordering fields in the field map section of the tool.

Edit: FC2FC doesn't do this but...ogr to the rescue.

I just confirmed that ogr2ogr can do this. Specify your field name order on the -select switch. For instance, if I have a shapefile with two fields, "Name" and "FolderPath" (in that order), but I want a new shapefile with "FolderPath" first I would do this:

C:\Temp>ogr2ogr -f "ESRI Shapefile" re_order_ogr.shp re_order1.shp -select "FolderPath,Name"
  • 2
    While it wasn't as user friendly an option as I had hoped for, it definitely does the trick. I have created an ArcGIS python script that helps build the inputs for it, and the user just has to include the -select "field1,field2,etc" option. You can download it at resources.arcgis.com/Resources2010/gallery/file/geoprocessing/… – RyanDalton Feb 8 '11 at 18:45
  • I have a feature class on SDE with domains. Will this hold the associated domains? – MjonesGEO Nov 5 '14 at 16:52
  • @joebob no. AFAIK, ogr doesn't support datasets from SDE GDBs and it doesn't support domains either. – Derek Swingley Nov 5 '14 at 18:02
  • Thanks, I just used XRay and it can either reorder or replace fields while holding their domains in SDE. – MjonesGEO Nov 5 '14 at 18:34

The ET GeoWizards tool will do this, and it looks like the free version will do it without any limitations on the number of features.

  • It does but sadly doesn't retain aliases. – Howeitzer Feb 16 '16 at 12:33

The QGIS "Table Manager" Plugin now also has the ability to perform this task easily with no command line necessary.


In QGIS you can now use the processing toolbox (Ctl+Alt+T) and go to QGIS geoalgorithms > Vector table tools > Refactor fields.

From there you'll have all the tools to edit your table structure.

enter image description here


X-Ray arcmap add in have a tool for reorder fields of Geodatabes formatx-ray reorder fields tool here

  • This works very well. It will even hold your domains in fields if you're re-ordering an SDE. Great suggestion!! – MjonesGEO Nov 5 '14 at 17:59

For the reference: MapInfo can also do it out-of-the-box. Just open the DBF and reorder the fields permanently. http://www.dbf-editor.com does it too ($40). Other DBF editors can probably do it too.

  • in this line, infolib should probably work too (convert to ascii (csv), rearrange to suit, re-convert back to info or dbf), as long as you're willing to live with the limitations of the .dbf file format. – matt wilkie Jun 9 '11 at 22:11
  • You mean living with the limitations of the CSV format? DBF is the starting point for this question... – Uffe Kousgaard Jun 10 '11 at 11:39
  • I meant dbf limits, thinking specifically that csv has no limits on field name length or record value lengths, and that starting point was file gdb, but re-reading the Q I see "shp" is mentioned in the title. So, limits all around ;-) – matt wilkie Jun 10 '11 at 18:02

I have had a similar issue, and the fastest way to permanently reorder data fields, if you already have QGIS, is to use the 'Table Manager' plugin as previously suggested.

It is simple to install plugins and is user-friendly, as described on the page below:


It allows you to move the attributes in a specific order, rename the fields, insert any new fields and replicate them. It also allows you to save the original file, or rename it and save it differently from the original.

enter image description here

This was a quick and convenient solve to my attribute table management problem, and is highly recommended, especially for files with a large number of attributes associated with it.


Export the feature classes to an empty personal geodatabase (drag and drop is fastest), open the .mdb in Access, re-order the fields in Design View, save, then with ArcMap/Catalog copy back to shape or file geodatabase.

The same method works for renaming fields.

Be careful though, only work on copies, it is easy to screw everything up. (As Karey Jack notes in another answer, Esri discourages direct .mdb access). For safety ignore all the tables beginning with GDB_ and also those ending with _Shape_Index.


Yo the best way to do it is to use Field Mappings. I've been struggling with this feature of ESRI software for years, but I'm finally content with this solution. Basically, you can just make a copy of your Feature Class with the fields permanently reordered using arcpy.FieldMappings. All of the data is carried over as well. Once the script is complete, just rename your old Feature Class to myFeatureClass_old, and your new one to myFeatureClass!

Here's the script, it's super straightforward:

import arcpy
This is possible in python using FeatureClasstoFeatureClass with Fieldmappings. You can also rename fields at the same time.
So if you have a Feature Class with FIELD3, FIELD2, FIELD1 and you want the result to be FIELD1, FIELD2, FIELD3 then the following code should accomplish this.
arcpy.env.workspace = r"C:\Users\myself\ArcData\my_geodatabase.gdb"
arcpy.env.overwriteOutput = True

input_fpath = "Lakes"

output_dpath = arcpy.env.workspace
output_fname = "Lakes_new"

fms = arcpy.FieldMappings()

fm = arcpy.FieldMap()

fm = arcpy.FieldMap()

fm = arcpy.FieldMap()


Feature Class to Feature Class now can perform this in 10.5 using the GP Tool Field Mapping section.

enter image description here


MakeQueryTable will let you define the order of your fields for a table or FC (Geodatabase only). The order that you specify the fields is the order of the output. I find this tool difficult to use. YMMV

Arctoolbox, data management tools, layers and table views, make query Table


Try OGR2OGR. You can pass an SQL query, and put the fields in the order you want them.

ogr2ogr outdataset indataset -sql "SELECT src_field1 AS dst_field1, src_field2 AS dst_field2 FROM sourcelayer"

Just tested this, and it works fine!

FYI, The easiest way to install OGR is via FWTools.


Open the .mdb file in MS Access and reorder the fields using drag and drop in 'Design View'

Though ESRI discourages editing a database in Access ESRI link


I'm a bit late to the party on this one, but I'm surprised that no one has mentioned the ESRI Geodatabase Diagrammer.

A resource provided by ESRI for editing the XML structure of your geodatabase and files. As far as I'm concerned it's essential if you're working on anything where design has to be perfect (long term project). It'll keep you from having to re-create files continually after making a simple mistake.

  • 1
    Did you see the comment (to the question itself) stating that this was not a database reorganization, but rather is needed to export the data? – whuber Jul 30 '12 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.