form serialization library

Turn forms
into objects.

Parse browser forms into structured JavaScript objects. Six adapters — React hooks, vanilla DOM, jQuery, FormData, and more. One coherent API.

$ npm install @form2js/react react Try the playground ↓ API Docs →

Playground

Try it live

Submit forms with schema-aware async state.

person.interests[]

Output

Submit state

Ready to submit.
isSubmittingfalseisErrorfalseisSuccessfalse

Submit the form to see parsed output.

Use in your project

Install

Pick the adapter for your stack. All packages share the same path-syntax so switching is painless.

npm install @form2js/react react
import { useForm2js } from '@form2js/react'

const { onSubmit, isSubmitting } = useForm2js(handler)

// nested names just work:
// <input name="user.email" />
// → { user: { email: '…' } }

Reference

API Documentation

Exact signatures, option defaults, TypeScript types, and compatibility notes for every package — all generated from the same source of truth.

Open API Docs →