JSON2Form is a lightweight web application that converts JSON into an editable, dynamic form and allows users to seamlessly modify the data and save it back to valid JSON.
It supports complex, nested JSON structures including objects, arrays, primitive values, and even root-level arrays — all while preserving key order and providing an intuitive, form-based editing experience.
- Convert JSON into an editable form UI
- Full round-trip editing: JSON → Form → JSON
- Supports deeply nested objects and arrays
- Handles primitive values (string, number, boolean, null)
- Root-level JSON array support
- Copy, duplicate, add, and remove operations
- Key renaming with original order preserved
- Collapsible sections for better readability
- Bootstrap-styled UI (no custom CSS required)
- No third-party JSON editor libraries used
Textarea-based editor with Preview and Format actions
/screenshots/editor.png
JSON rendered as an editable, structured form
/screenshots/form.png
JSON2Form is hosted using GitHub Pages and can be used directly without any local setup.
👉 Live Demo:
https://<your-github-username>.github.io/JSON2Form/
JSON2Form supports:
- JSON Objects
- JSON Arrays (including root-level arrays)
- Primitive values:
- string
- number
- boolean
- null
- Mixed-type arrays
- Deeply nested structures
- Key renaming without losing order
- The UI is rendered recursively, allowing unlimited nesting.
- Each object internally maintains a non-enumerable
__keyOrderarray to preserve key order. - All edits mutate the same in-memory JSON structure to ensure consistency.
- Bootstrap’s native collapse functionality is used for section toggling.
- No schema or metadata is injected into the final saved JSON.
- Angular 8
- TypeScript 3.5
- Bootstrap 3 (via CDN)
- RxJS 6
- No external JSON editor or form libraries
- Node.js 10.x or 12.x
- Angular CLI 8.x
npm install
ng serveOpen your browser at:
http://localhost:4200
- Paste or type JSON into the editor
- Click Format to beautify the JSON (4-space indentation)
- Click Preview to open the form editor
- Edit values directly in the form
- Use:
- ➕ to add fields or array items
- 📄 to duplicate objects or items
- 🗑️ to remove elements
- Click Save to convert the form back into JSON
- Key order preservation is handled manually using a non-enumerable property.
- Root-level copy/remove actions are intentionally limited for safety.
- Bootstrap 3 is used for stability and simplicity.
- Designed specifically for Angular 8 compatibility.
- Recursive rendering may impact performance for very large JSON payloads.
- Recommended for moderate-sized JSON documents.
- Future optimizations are planned to improve scalability.
- Drag-and-drop reordering of fields and array items
- Performance optimizations for large JSON
- Separate maintained version for Angular 15+
- Improved UX for large nested structures
- Angular 8.x
- Modern evergreen browsers (Chrome, Edge, Firefox)
- Hosted via GitHub Pages for easy access
This project is licensed under the MIT License.