QGIS Refactor Fields tool for altering attribute tables states:

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.

Fields can also be added and deleted. However, output also alters the length of all fields to 255. Is this expected behavior? Can original field lengths be retained?

  • Are you saving the output as a shapefile?
    – BERA
    Mar 9 at 6:18

1 Answer 1


There are options to have Length and Precision changed, but this is set to 0 by default. (Which I believe for a text field will end up being 255).

so in answer to your question - can the original field lengths be retained? Yes, but you will need to manually set them.

My suggestion is to use a template that you import and apply.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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