# Change ID format for existing objects in bulk

**URL:** <https://gramps.discourse.group/t/change-id-format-for-existing-objects-in-bulk/1897>\
**Category:** Help\
**Created:** [October 14, 2021, 12:14am UTC](https://gramps.discourse.group/t/change-id-format-for-existing-objects-in-bulk/1897 "2021-10-14T00:14:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcsaaver](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/jcsaaver/32/471_2.png) [@jcsaaver](https://gramps.discourse.group/u/jcsaaver)\
**Post date:** [October 14, 2021, 12:14am UTC](https://gramps.discourse.group/t/change-id-format-for-existing-objects-in-bulk/1897/1 "2021-10-14T00:14:16Z")

</div>

Hi everyone!

I need help in re-formatting the ID’s in my database.  
When I started I didn’t change the default format wich has four digits. But as now I have 8000+ events, I would like to add a couple of zeros before all ID’s, so they have 6 digits instead of 4.  
If I change it in preferences, it takes effect only on new objets, but I would like to change the existing ID’s too.

Is there a way I can do this?

Thank you.

Gramps 5.1.4 in Ubuntu 20.04

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [October 14, 2021, 1:22am UTC](https://gramps.discourse.group/t/change-id-format-for-existing-objects-in-bulk/1897/2 "2021-10-14T01:22:59Z")

</div>

There’s an app for that!

Menu \>\> Tools \>\> Family Tree Processing \>\> [Reorder Gramps IDs](https://gramps-project.org/wiki/index.php?title=Gramps_5.1_Wiki_Manual_-_Tools#Reorder_Gramps_ID)

The default screen displays what is. You can change the format by adding digits from `%04` to `%05` or `%06`. You can select to include/exclude specific database areas. Running the tool at this stage will add zeros (0) padding out existing IDs.

Checking **Change** will renumber the database reclaiming those numbers deleted or merged. Keep will not change any ID’s outside the default numbering scheme. In particular if you use [GetGOV](https://gramps-project.org/wiki/index.php/Addon:GetGOV) or the [Place Cleanup](https://gramps-project.org/wiki/index.php/Addon:PlaceCleanupGramplet) tool to populate your place database, these tools use the ID field for their numbers. It is just as easy to exclude the Place database from any change.

And as always before running a batch edit tool, make sure you have a backup of the database. There is no undo for this process.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [November 13, 2021, 1:23am UTC](https://gramps.discourse.group/t/change-id-format-for-existing-objects-in-bulk/1897/3 "2021-11-13T01:23:43Z")

</div>

Closed on November 13, 2021, 1:23am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
