WordPress ACF JSON Generator

Build ACF field groups visually and export JSON for ACF Tools → Import or for Local JSON sync in acf-json.

Runs in your browser

Field group

Location rules

Show this field group if…

Common values: post, page, attachment, product

Presentation & settings

Lower numbers appear first.

Adds an acf object to REST responses (ACF 6.1+).

Hide on screen

Fields (11)

JSON format

Format

An array of field groups. In WordPress go to ACF → Tools → Import Field Groups, choose the downloaded file and click Import JSON.

Repeater and Gallery fields require ACF PRO. The free version ignores them.
show_in_rest exposes these values in the REST API (ACF 6.1+). Do not enable it for private data.

Import JSON

[
    {
        "key": "group_c0c458a52dd37",
        "title": "Book Details",
        "fields": [
            {
                "key": "field_c2a0d1246d8ab",
                "label": "General",
                "name": "",
                "aria-label": "",
                "type": "tab",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "placement": "top",
                "endpoint": 0,
                "selected": 0
            },
            {
                "key": "field_e5a728fb9a018",
                "label": "Subtitle",
                "name": "subtitle",
                "aria-label": "",
                "type": "text",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "50",
                    "class": "",
                    "id": ""
                },
                "default_value": "",
                "maxlength": "",
                "placeholder": "A short tagline",
                "prepend": "",
                "append": ""
            },
            {
                "key": "field_303f17df4421b",
                "label": "ISBN",
                "name": "isbn",
                "aria-label": "",
                "type": "text",
                "instructions": "13-digit ISBN without dashes.",
                "required": 1,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "50",
                    "class": "",
                    "id": ""
                },
                "default_value": "",
                "maxlength": "",
                "placeholder": "",
                "prepend": "",
                "append": ""
            },
            {
                "key": "field_b1f86888f6e96",
                "label": "Cover Image",
                "name": "cover_image",
                "aria-label": "",
                "type": "image",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "return_format": "array",
                "library": "all",
                "min_width": "",
                "min_height": "",
                "min_size": "",
                "max_width": "",
                "max_height": "",
                "max_size": "",
                "mime_types": "",
                "preview_size": "medium"
            },
            {
                "key": "field_17757da0b6240",
                "label": "Format",
                "name": "format",
                "aria-label": "",
                "type": "select",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "choices": {
                    "hardcover": "Hardcover",
                    "paperback": "Paperback",
                    "ebook": "E-book",
                    "audiobook": "Audiobook"
                },
                "default_value": "paperback",
                "return_format": "value",
                "multiple": 0,
                "allow_null": 0,
                "ui": 0,
                "ajax": 0,
                "placeholder": ""
            },
            {
                "key": "field_5c8388b09c4b6",
                "label": "Price",
                "name": "price",
                "aria-label": "",
                "type": "number",
                "instructions": "Price in USD.",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "default_value": "",
                "min": 0,
                "max": "",
                "placeholder": "",
                "step": 0.01,
                "prepend": "",
                "append": ""
            },
            {
                "key": "field_23bf34d0774d9",
                "label": "Publication Date",
                "name": "publication_date",
                "aria-label": "",
                "type": "date_picker",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "display_format": "F j, Y",
                "return_format": "F j, Y",
                "first_day": 1
            },
            {
                "key": "field_e2f991fd4bd53",
                "label": "Featured",
                "name": "featured",
                "aria-label": "",
                "type": "true_false",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "message": "Show this book on the home page",
                "default_value": 0,
                "ui": 1,
                "ui_on_text": "",
                "ui_off_text": ""
            },
            {
                "key": "field_c318e95b91164",
                "label": "Extras",
                "name": "",
                "aria-label": "",
                "type": "tab",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "placement": "top",
                "endpoint": 0,
                "selected": 0
            },
            {
                "key": "field_f8f2d156abec4",
                "label": "Buy Link",
                "name": "buy_link",
                "aria-label": "",
                "type": "link",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "return_format": "array"
            },
            {
                "key": "field_68461c1470646",
                "label": "Reviews",
                "name": "reviews",
                "aria-label": "",
                "type": "repeater",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "layout": "block",
                "pagination": 0,
                "min": "",
                "max": "",
                "collapsed": "",
                "button_label": "Add review",
                "rows_per_page": 20,
                "sub_fields": [
                    {
                        "key": "field_394ab86bafb65",
                        "label": "Quote",
                        "name": "quote",
                        "aria-label": "",
                        "type": "textarea",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "parent_repeater": "field_68461c1470646",
                        "default_value": "",
                        "maxlength": "",
                        "rows": 3,
                        "placeholder": "",
                        "new_lines": ""
                    },
                    {
                        "key": "field_cccff6ce3e316",
                        "label": "Reviewer",
                        "name": "reviewer",
                        "aria-label": "",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "parent_repeater": "field_68461c1470646",
                        "default_value": "",
                        "maxlength": "",
                        "placeholder": "",
                        "prepend": "",
                        "append": ""
                    },
                    {
                        "key": "field_134429ca9341a",
                        "label": "Source URL",
                        "name": "source_url",
                        "aria-label": "",
                        "type": "url",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "parent_repeater": "field_68461c1470646",
                        "default_value": "",
                        "placeholder": ""
                    }
                ]
            }
        ],
        "location": [
            [
                {
                    "param": "post_type",
                    "operator": "==",
                    "value": "book"
                }
            ]
        ],
        "menu_order": 0,
        "position": "acf_after_title",
        "style": "default",
        "label_placement": "top",
        "instruction_placement": "label",
        "hide_on_screen": "",
        "active": true,
        "description": "Extra information shown on single book pages.",
        "show_in_rest": 1
    }
]

ACF JSON: import files and Local JSON

Advanced Custom Fields can describe field groups as JSON in two closely related formats. The import file is what ACF → Tools → Export produces and Import accepts: a JSON array that can hold one or many field groups. Local JSON is a single field-group object saved as group_xxxxxxxxxxxxx.json in an acf-json folder inside your theme or plugin.

Local JSON is the workflow most agencies use. When the folder exists, ACF writes a JSON file every time a field group is saved in the admin, and reads field definitions from the files instead of the database — faster, and easy to commit to Git. When a file is newer than the database copy (judged by its modified timestamp), ACF shows Sync available, so changes made on a developer’s machine can be pulled into staging and production with one click.

This generator gives you a visual builder with the same field types and settings as ACF and outputs either format. Keys are generated deterministically from the group title and field names, and the modified value is set to the current time whenever you edit, so the sync notice appears as expected.

How to use the WordPress ACF JSON Generator

  1. Build the field group: title, location rules and fields — or load the sample.
  2. Choose Tools → Import file for a one-off import, or Local JSON for an acf-json file.
  3. Download the file. For imports, open ACF → Tools, pick the file under Import Field Groups and click Import JSON.
  4. For Local JSON, save the file in wp-content/themes/your-theme/acf-json/ (create the folder), then open ACF → Field Groups and click Sync available.

Example

The outer shape of a Local JSON file (fields shortened):

{
    "key": "group_7c1f0a3e9b2d4",
    "title": "Book Details",
    "fields": [ … ],
    "location": [
        [
            { "param": "post_type", "operator": "==", "value": "book" }
        ]
    ],
    "position": "acf_after_title",
    "active": true,
    "show_in_rest": 1,
    "modified": 1790000000
}

Local JSON tips

  • The file name must match the group key: group_7c1f0a3e9b2d4.json.
  • ACF writes to the active theme’s acf-json folder by default. In a plugin, set the save and load paths with the acf/settings/save_json and acf/settings/load_json filters.
  • Commit the acf-json folder to version control and never edit the same group on two environments without syncing first — the newest modified timestamp wins.
  • Need fields that editors can never change? Use the ACF Field Generator to register them in PHP instead. The ACF field groups guide compares the approaches.

Frequently Asked Questions

What is the difference between the import file and Local JSON?

The import file is an array of groups that ACF copies into the database once. A Local JSON file is a single group object that ACF keeps reading from disk and offers to sync whenever it changes.

Why doesn’t “Sync available” appear?

Check that the folder is named exactly acf-json in the active theme (or registered via acf/settings/load_json), that the file name matches the key, and that the modified value is newer than the group already in the database.

Can I import a Local JSON file with ACF → Tools?

Yes. ACF’s importer accepts a single group object as well as an array, so either file from this tool works with Tools → Import.

Will importing overwrite an existing field group?

If a group with the same key exists, ACF updates it in place; otherwise it creates a new group. Fields keep their saved values as long as their names stay the same.

How do I validate or tidy the JSON?

The output is already valid, pretty-printed JSON. To inspect or reformat a JSON file you exported elsewhere, use the JSON Formatter.