Turns a json field into real Payload admin components that editors fill in, while the form shape is built in a drawer inside the admin. The site reads the stored value as a plain object of keys, and new sections need no migration. It requires Payload 3.90 or later and the companion guard plugin, with access rules written in an access policy file.
Edit a Payload JSON field as real admin fields. The shape lives in the value, is built in a drawer, and the site reads plain values by key
Installation
npm i @focus-reactive/payload-plugin-json-form-builder37
Stars
5
Forks
33
Open Issues
Today
Last Updated
36
Weekly Downloads
v2.0.1
npm Version
463.8 KB
Unpacked Size
2
Dependencies
37+22 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 37 |
| Dec 4, 2026 | 37 |
| Dec 3, 2026 | 37 |
| Dec 2, 2026 | 37 |
| Dec 1, 2026 | 36 |
| Nov 30, 2026 | 35 |
| Nov 29, 2026 | 35 |
| Nov 28, 2026 | 34 |
| Nov 27, 2026 | 34 |
| Nov 26, 2026 | 34 |
| Nov 25, 2026 | 34 |
| Nov 24, 2026 | 34 |
| Nov 23, 2026 | 34 |
| Nov 22, 2026 | 34 |
| Nov 21, 2026 | 34 |
| Nov 20, 2026 | 33 |
| Nov 19, 2026 | 32 |
| Nov 18, 2026 | 32 |
| Nov 17, 2026 | 32 |
| Nov 16, 2026 | 32 |
| Nov 15, 2026 | 32 |
| Nov 14, 2026 | 32 |
| Nov 13, 2026 | 32 |
| Nov 12, 2026 | 32 |
| Nov 11, 2026 | 32 |
| Nov 10, 2026 | 32 |
| Nov 9, 2026 | 31 |
| Nov 8, 2026 | 31 |
| Nov 7, 2026 | 31 |
| Nov 6, 2026 | 31 |
| Nov 5, 2026 | 31 |
| Nov 4, 2026 | 30 |
| Nov 3, 2026 | 30 |
| Nov 2, 2026 | 30 |
| Nov 1, 2026 | 30 |
| Oct 31, 2026 | 30 |
| Oct 30, 2026 | 30 |
| Oct 29, 2026 | 30 |
| Oct 28, 2026 | 30 |
| Oct 27, 2026 | 30 |
| Oct 26, 2026 | 30 |
| Oct 25, 2026 | 30 |
| Oct 24, 2026 | 29 |
| Oct 23, 2026 | 29 |
| Oct 22, 2026 | 29 |
| Oct 21, 2026 | 29 |
| Oct 20, 2026 | 29 |
| Oct 19, 2026 | 29 |
| Oct 18, 2026 | 29 |
| Oct 17, 2026 | 27 |
| Oct 16, 2026 | 26 |
| Oct 15, 2026 | 26 |
| Oct 14, 2026 | 26 |
| Oct 13, 2026 | 25 |
| Oct 12, 2026 | 25 |
| Oct 11, 2026 | 25 |
| Oct 10, 2026 | 25 |
| Oct 9, 2026 | 25 |
| Oct 8, 2026 | 25 |
| Oct 7, 2026 | 25 |
| Oct 6, 2026 | 24 |
| Oct 5, 2026 | 24 |
| Oct 4, 2026 | 24 |
| Oct 3, 2026 | 23 |
| Oct 2, 2026 | 22 |
| Oct 1, 2026 | 22 |
| Sep 30, 2026 | 20 |
| Sep 29, 2026 | 20 |
| Sep 28, 2026 | 20 |
| Sep 27, 2026 | 20 |
| Sep 26, 2026 | 19 |
| Sep 25, 2026 | 18 |
| Sep 24, 2026 | 18 |
| Sep 23, 2026 | 18 |
| Sep 22, 2026 | 18 |
| Sep 21, 2026 | 18 |
| Sep 20, 2026 | 18 |
| Sep 19, 2026 | 18 |
| Sep 18, 2026 | 18 |
| Sep 17, 2026 | 18 |
| Sep 16, 2026 | 18 |
| Sep 15, 2026 | 18 |
| Sep 14, 2026 | 18 |
| Sep 13, 2026 | 17 |
| Sep 12, 2026 | 17 |
| Sep 11, 2026 | 17 |
| Sep 10, 2026 | 16 |
| Sep 9, 2026 | 16 |
| Sep 8, 2026 | 16 |
| Sep 7, 2026 | 15 |
| Sep 6, 2026 | 15 |
Shared by 15 plugins in focusreactive/payload-plugins.
39−1.2K since Oct 8
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 39 |
| Dec 4, 2026 | 38 |
| Dec 3, 2026 | 43 |
| Dec 2, 2026 | 48 |
| Dec 1, 2026 | 32 |
| Nov 30, 2026 | 33 |
| Nov 29, 2026 | 32 |
| Nov 28, 2026 | 29 |
| Nov 27, 2026 | 28 |
| Nov 26, 2026 | 16 |
| Nov 25, 2026 | 11 |
| Nov 24, 2026 | 14 |
| Nov 23, 2026 | 15 |
| Nov 22, 2026 | 16 |
| Nov 21, 2026 | 17 |
| Nov 20, 2026 | 40 |
| Nov 19, 2026 | 41 |
| Nov 18, 2026 | 61 |
| Nov 17, 2026 | 61 |
| Nov 16, 2026 | 66 |
| Nov 15, 2026 | 81 |
| Nov 14, 2026 | 148 |
| Nov 13, 2026 | 146 |
| Nov 12, 2026 | 151 |
| Nov 11, 2026 | 142 |
| Nov 10, 2026 | 155 |
| Nov 9, 2026 | 154 |
| Nov 8, 2026 | 139 |
| Nov 7, 2026 | 89 |
| Nov 6, 2026 | 91 |
| Nov 5, 2026 | 129 |
| Nov 4, 2026 | 119 |
| Nov 3, 2026 | 113 |
| Nov 2, 2026 | 133 |
| Nov 1, 2026 | 138 |
| Oct 31, 2026 | 126 |
| Oct 30, 2026 | 109 |
| Oct 29, 2026 | 59 |
| Oct 28, 2026 | 57 |
| Oct 27, 2026 | 65 |
| Oct 26, 2026 | 47 |
| Oct 25, 2026 | 67 |
| Oct 24, 2026 | 245 |
| Oct 23, 2026 | 238 |
| Oct 22, 2026 | 246 |
| Oct 21, 2026 | 254 |
| Oct 20, 2026 | 252 |
| Oct 19, 2026 | 282 |
| Oct 18, 2026 | 456 |
| Oct 17, 2026 | 409 |
| Oct 16, 2026 | 751 |
| Oct 15, 2026 | 1,086 |
| Oct 14, 2026 | 2,281 |
| Oct 13, 2026 | 2,264 |
| Oct 12, 2026 | 2,226 |
| Oct 11, 2026 | 2,025 |
| Oct 10, 2026 | 1,888 |
| Oct 9, 2026 | 1,546 |
| Oct 8, 2026 | 1,203 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1177993877-payload-plugin-json-form-builder)<a href="https://payloaddirectory.dev/plugins/1177993877-payload-plugin-json-form-builder"><img src="https://payloaddirectory.dev/badge/1177993877-payload-plugin-json-form-builder.svg" alt="Payload Directory"></a>README
This plugin turns an ordinary json field into Payload components. An editor fills in text, picks images from Media, writes rich text, builds lists - and all of it lands back in the same json value, which your site reads as plain keys. The form those components make is built in the admin panel too: the plugin brings its own builder, where fields are added, renamed and reordered without a deploy.

Copy and paste this prompt into your AI assistant (Cursor, Claude, etc.) to add the plugin to an existing Payload project.
I want to edit Payload json fields as real admin forms with
@focus-reactive/payload-plugin-json-form-builder. Follow these steps in order, and stop to ask me where a step says so.
## Rules you must follow
- Never write an access rule that admits every logged-in user: no `Boolean(req.user)`, no `() => true`,
no `({ req }) => !!req.user`. A rule names a role, or it is `nobody`.
- Do not invent roles. Ask me which roles may build forms and who may read and edit the plugin's global.
- Write every policy entry by hand in `src/access.policy.ts`, and grant each capability and each
collection right explicitly to the roles I name. Nothing is open by default.
- When the boot or a request fails, fix the cause or ask me. Never use `anyone`, a looser gate,
`overrideAccess` or a removed or disabled check to make an error go away.
- Do not add `overrideAccess: true` anywhere, and do not add `access` to the plugin's global.
## How the plugin works
A `jsonField()` holds a form: its shape (which fields, their kinds and settings) and the values filled in.
Everyone who may update the document fills in values; only users with the `build` capability may change the shape.
The server enforces this on every write, over REST, GraphQL and the Local API as a user.
The plugin adds a global (`json-form` by default) that holds the library of shared sections and the rich text anchor.
Its read and update access come from the project's access policy.
## Step 1: install
pnpm add @focus-reactive/payload-plugin-json-form-builder @focus-reactive/payload-plugin-guard
Check that `payload` is 3.90 or later; if it is not, upgrade it first.
## Step 2: ask me about roles
Look at the auth collection named in `admin.user` and the roles it has.
Ask me: "Which roles may build and change forms?", "Which roles may read the json-form global?" and
"Which roles may edit the json-form global?"
Wait for my answers. Write each answer as a gate in the policy file in step 3.
## Step 3: the access policy file
Open `src/access.policy.ts`, or create it if the project has none, following the guard README
(`defineAccessPolicy`, `gate`, `filter`, `nobody`, `anyone`, checked with `satisfies AccessPolicy<Config>`).
If you create it, every collection and global of the config needs an entry: move each existing
`access` of the project into the file, and ask me for every rule you cannot read from the code.
Add these entries for this plugin:
globals: {
"json-form": { read: <the gate from my second answer>, update: <the gate from my third answer> },
},
plugins: {
"json-form-builder": { build: <the gate from my first answer> },
},
## Step 4: register the plugin and wrap the config
// payload.config.ts
import { buildConfig } from 'payload'
import { withAccessPolicy } from '@focus-reactive/payload-plugin-guard'
import { jsonFormPlugin } from '@focus-reactive/payload-plugin-json-form-builder'
import { accessPolicy } from './access.policy'
export default withAccessPolicy(
accessPolicy,
buildConfig({
// ...the existing config
plugins: [
jsonFormPlugin({ access: accessPolicy.plugins['json-form-builder'] }),
],
})
)
Add `jsonField({ name: 'settings' })` to the collections or globals I name.
Run `pnpm payload generate:types` and `pnpm payload generate:importmap`.
## Step 5: verify, and show me the output
With the app running, send each request and show me the status code.
Every one of them must be refused. If one succeeds, the policy is wrong: stop and tell me.
1. Anonymous write to the plugin's global, expect 403:
curl -i -X POST http://localhost:3000/api/globals/json-form -H 'Content-Type: application/json' -d '{}'
2. As a user who may update a document with a json field but may not build forms, PATCH that document
with one more section in the field, for example
{"settings":[...the current sections, {"name":"extra","type":"text","value":""}]}, expect 403.
3. As the same user, PATCH the value of a field marked `readOnly`, expect 403.
Then, as the same user, change a text value in the form and save: it must succeed.
As a user who may build forms, add a field in the builder and save: it must succeed.
pnpm add @focus-reactive/payload-plugin-json-form-builder @focus-reactive/payload-plugin-guard
pnpm payload generate:importmap
The plugin is built on @focus-reactive/payload-plugin-guard.
Who may build forms, and who may read and edit the plugin's global, is written in the project's access policy file.
// src/access.policy.ts, the entries for this plugin
globals: {
"json-form": { read: isStaff, update: isEditor },
},
plugins: {
"json-form-builder": { build: isAdmin },
},
// payload.config.ts
export default withAccessPolicy(
accessPolicy,
buildConfig({
plugins: [
jsonFormPlugin({
richText: { editor: lexicalEditor() },
access: accessPolicy.plugins["json-form-builder"],
}),
],
})
);
// any collection or global
fields: [jsonField({ name: "settings" })];
isAdmin, isEditor and isStaff stand for gates on your own roles; the guard README shows how to write them.
Building a section describes it much the way you would describe a schema in code: every node has a kind, a key and a value. That description just does not live in your repository - it lives in the field. The plugin reads it and draws real Payload components, which are far nicer to work with than json in a textarea: fields are filled in, hidden, dragged, deleted, nearly everything an ordinary field allows.
There is one difference, and it is in your favour: a new section needs no migration. However many fields you add and however deeply you nest them, the database still holds one json field, and what leaves it is a plain object of keys.
// what is stored // what your site receives
[ {
{ "name": "hero", "hero": {
"type": "collapsible", "title": "Hackathon",
"fields": [ "live": true
{ "name": "title", "type": "text", }
"value": "Hackathon" }, }
{ "name": "live", "type": "checkbox",
"value": true } ] }
]
The form is built in the builder: sections on the left, the palette of kinds on the right. Thirteen kinds - text, number, date, select, checkbox, upload, rich text, list, group, accordion, tabs - nested as deep as you like.

jsonFormPlugin({
// who may build and change forms: the gates from your access policy; required
access: accessPolicy.plugins["json-form-builder"],
// the library of reusable sections; off by default
library: true,
// the editor rich text is written with; without it the kind stays out of the palette
richText: { editor: lexicalEditor() },
// the collection the upload kind picks files from; media by default
uploads: "media",
// the global the plugin adds itself: it holds the rich text anchor and the library
global: { slug: "json-form" },
});
| Capability | Lets a user | Also needs |
|---|---|---|
build | change the shape of a form: add, rename and remove fields, change kinds and settings (readOnly, required, options, limits, conditions), attach and detach shared sections, and write into read-only fields | update access to the document that holds the form |
Without build, a user who may update the document can do what the form itself offers:
On a document the user may not update, or one locked by another user, the form is read-only for everyone: inputs cannot be edited, sections and rows have no menu, and the builder (gear, Add field and the builder drawer) is not offered.
A user with build can still switch between the Fields and JSON views there, and the JSON is read-only.
Anything else in the request is refused with 403, whether it comes from the admin, REST, GraphQL or the Local API with a user.
The Local API without a user, or with overrideAccess: true on an update, is trusted and not checked.
A new document may only carry the field's defaultValue, and restoring a version with another shape needs build.
Reads:
http, https, mailto, tel or relative addresses are kept, so your site can render them as HTML.| Slug | Kind | Written by | Read by |
|---|---|---|---|
json-form (or global.slug) | global | your policy's update | your policy's read |
global: false leaves the global out, and with it the policy entry.
library - reusable sectionsEven without it the plugin gives you a global where sections are built and rendered on the site. The library is about something else: sections that repeat across many pages.
It works as a reference. In the library you build a section - its form and, where it helps, default values. Any json field can then point at it: the values there are its own and are edited as usual, while the form comes from the library. The form can only be changed there - add a field and it appears in every page that points at the section.
// the library: either in the plugin's own global
jsonFormPlugin({ library: true })
// or as a field of your own, beside what it shares with
fields: [
{ type: 'group', label: 'Components', fields: [jsonField({ name: 'components' })] },
{ type: 'group', label: 'Shared sections', fields: [jsonLibraryField()] },
]
// a field that may point at them
jsonField({ name: 'settings', shares: true })
In that field's builder, two groups appear under Add section: Attached sections, each with a ×, and Shared sections, each with a +. In the form, an attached section carries a global chip.
2.0 moves the plugin onto @focus-reactive/payload-plugin-guard; Upgrading to the guard explains the model all the plugins share, with a complete example.
Every access rule is now written by hand in your project's src/access.policy.ts, and nothing is open by default: an entry you leave out stops the boot, and a capability you do not grant is refused for everyone.
@payloadcms/* package 3.90 or later, with the React and Next versions Payload 3.90 requires, Node 22.22 or later, and @focus-reactive/payload-plugin-guard installed next to the plugin.access is a required option with no default.build option of jsonFormPlugin and of jsonField is gone, and so is the BuildGate type: the rule is the build gate in the policy, and it applies to every json field.global.access is gone: the global's access comes from the policy entry for its slug.build is refused with 403, over REST, GraphQL and the Local API as a user.jsonField() needs the plugin: a json field read or written without it throws.Upgrade payload and every @payloadcms/* package to 3.90 or later, run the server on Node 22.22 or later, and install the guard:
pnpm add @focus-reactive/payload-plugin-guard @focus-reactive/payload-plugin-json-form-builder.
Add the plugin's entries to src/access.policy.ts, with gates for your own roles; if the project has no policy file yet, write it first as the guide describes.
// src/access.policy.ts, inside defineAccessPolicy({ ... })
globals: {
"json-form": { read: panelUser, update: isEditor },
},
plugins: {
"json-form-builder": { build: isAdmin },
},
build: change the shape of a form (add, rename and remove fields, change kinds and settings, attach and detach shared sections) and write into read-only fields; the user also needs update access to the document.json-form (or the slug in global.slug): the library of shared sections; read decides who may use them in forms, update who edits the library.Pass access: accessPolicy.plugins["json-form-builder"] to jsonFormPlugin, and export the config wrapped: export default withAccessPolicy(accessPolicy, buildConfig({ ... })).
Database: no migration; the global and the json fields keep their columns.
Re-test: as a user without build, a REST PATCH that adds a field to a form answers 403 while one that only fills in values succeeds; a stored rich text value with a <script> comes back sanitized; then build a form as a user with build and fill it in as an editor.
| Payload | Plugin |
|---|---|
| 3.90+ | 2.x |
| 3.84+ | 1.x |
MIT
Topics
Tags
payload plugin presets
Save and apply reusable block configurations as presets from the Payload admin blocks drawer
786.7k/wk37v3
payload plugin guard
Central access policy file, typed predicates and guarded endpoints for Payload plugins and Local API calls
73664/wk37v3
payload plugin audit log
Append-only audit log of document, global and auth changes with CSV and NDJSON export
72394/wk37v3
payload plugin translator
Translate localized Payload content with an AI provider from the admin panel via background jobs
713.9k/wk37v3
payload plugin stacked editing
Stacked, breadcrumb-navigated editing panels for nested blocks and arrays in the Payload admin
71250/wk37v3
payload plugin seo
Live Yoast-powered SEO analysis drawer in the Payload document editor without adding fields to documents
70884/wk37v3