ACF Field Key Generator: Make Unique Field and Group Keys

ACF Field Key Generator: Make Unique Field and Group Keys

If you are registering Advanced Custom Fields in PHP or hand-editing a local JSON file, you need valid, unique field keys. An ACF Field Key Generator gives you them in one click, so you never accidentally reuse a key or typo one that breaks a field group. Here is what these keys are and how to make them safely.

What an ACF field key actually is

Every ACF field and field group has a key: a string like field_a1b2c3d4e5f6 for fields and group_a1b2c3d4e5f6 for groups. ACF uses these keys, not the field names, to map data in the database and to wire fields to their groups. The visible “name” can change, but the key is the stable identity behind it.

Because the key is the link, two rules matter:

  • Keys must be unique. Two fields sharing a key will collide and one will silently overwrite the other.
  • Keys should not change. Once a key is in use, editing it orphans any saved values tied to the old key.

That is why you do not type these by hand. A generated key looks like field_ followed by a random lowercase hex string, and the odds of a clash are effectively zero.

When you need to generate keys

You reach for the ACF Field Key Generator any time you are writing field definitions outside the ACF admin UI:

  • register_field_group() in a plugin or theme, where every key is required.
  • Local JSON under an acf-json/ folder, where each field and group needs its own key.
  • Programmatic fields added via acf_add_local_field_group() at runtime.
  • Copying a field group between projects, where you want fresh keys to avoid clashing with existing ones.

In all of these cases ACF will not auto-fill the key for you, so a generator saves time and prevents duplicates.

Generate ACF keys in three steps

  1. Open the ACF Field Key Generator.
  2. Pick whether you want a field key (field_...) or a group key (group_...), and generate as many as you need.
  3. Copy each key straight into your PHP array or JSON file.

It runs entirely in your browser. Nothing is sent anywhere, the keys are made locally with the browser’s random generator, and you can regenerate as often as you like for free.

Generate the key once, paste it in, and never worry about a collision again.

← All posts