94

I would like to rename some fields in my attribute table:

example

Like rename "XRF_N3"in something else. It seems quite a easy issue but I don't find any information about how can I do that.

5 Answers 5

131

Since 2.16, you can edit field names in the layer properties when editing is enabled:

enter image description here


Renaming is possible using Table Manager plugin (http://plugins.qgis.org/plugins/tablemanager/)

enter image description here

2
  • The table manager now shows up with the warning message, "may corrupt your data".
    – Kingfisher
    Dec 2, 2016 at 18:43
  • 2
    Good... because it does indeed corrupt the data sometimes ! Better use Refactor fields instead of Table Manager, it's safer.
    – gisnside
    Oct 8, 2017 at 8:27
32

Since QGIS 2.16 you no longer need a plugin to do this - you can double click a field name in a shapefile from the vector layer properties window and rename (set the layer as editable first)

0
10

if anyone is having any difficulty finding the Table manager button, for me it was located here:

location of table manager

0
5

No need for plugins since QGIS v3.12. There is now something called the Rename field tool — special thanks to ndawson for building the tool.

Procedure

  1. Locate the top-most menu bar
  2. Go to ProcessingToolbox
  3. In the Processsing Toolbox, go to Vector TableRename field
  4. The Rename Field window will be opened like so: Rename field window
  5. Select the Input layer that has the attribute table
  6. Select the Field to rename (field that you want to rename)
  7. Type the New field name
  8. Click Run
2

You can use Refactor Fields from processing toolbox. It will create a new layer as output having the new names you defined. Besides that, this tool also allows to change field types, field order and other stuff. You can also rename more than one field at once.

enter image description here

This algorithm allows editing the structure of the attributes table of a vector layer. Fields can be modified in their type and name, using a fields mapping. The original layer is not modified. A new layer is generated, which contains a modified attribute table, according to the provided fields mapping. Rows in orange have constraints in the template layer from which these fields were loaded. Treat this information as a hint during configuration. No constraints will be added on an output layer nor will they be checked or enforced by the algorithm.

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