Everything complex forms require — nothing bolted on.
Design, logic, validation, and export in one open-source platform. Build visually in Studio or describe what you need to an AI assistant.
git clone https://github.com/Formspec-org/formspec.git && cd formspec && npm i && npm run build Bottom line up front
Free and open-source — AGPL-3.0 license. No per-seat pricing, no usage limits. If you're evaluating form tools, here's the direct answer to the most common requirements.
| Requirement | What Formspec provides |
|---|---|
| Calculated fields that update in real time | 61 built-in functions for math, dates, text, and more. Calculations update instantly as the user types. No coding required — works like spreadsheet formulas. |
| Show/hide fields based on other answers | Set a condition on any field or section. When the condition is false, the field hides — and everything inside that section hides with it. |
| Required fields that depend on other answers | Make any field conditionally required based on other answers. "Required when the applicant selected Nonprofit" is a single rule, not custom code. |
| Cross-field validation with custom error messages | Write business rules that check across multiple fields — with custom messages at three severity levels: error (blocks submission), warning (flags for review), and info (context only). |
| Multi-step wizard navigation | Wizard (step-by-step), tabbed, and single-page layouts — all built in. Switch modes without rebuilding your form. |
| Repeatable sections (add/remove rows) | Users add and remove rows freely. Set minimum and maximum number of rows. Nest groups inside groups (e.g., budget categories → line items). |
| Money fields with no rounding errors | Money fields store the amount and currency together. Decimal-precision math means $0.10 + $0.20 always equals $0.30 — no floating-point surprises. |
| File upload with drag-and-drop | Drag-and-drop file upload with file-type restrictions and multi-file support. |
| Signature capture | Draw-on-screen signature capture. Saves as an image. |
| Pre-populate fields from another system | Pull data from EHR, CRM, or any API to pre-fill fields. Each pre-filled field can be editable or locked. |
| Export data in our format (JSON/XML/CSV) | Export responses as JSON, XML, or CSV — with field renaming, value translation, and conditional rules. The same mapping works for import and export. |
| Forms that work offline | All form logic runs on-device — browser, React app, iOS, or Android. No server connection needed while filling out the form. |
| Same validation on every platform | One Rust kernel powers validation across all five runtimes: web, React, iOS, Android, and server. Guaranteed identical results everywhere — no rule duplication. |
| Version-lock forms once deployed | Once published, a form version is locked. Every response records which version it was filled on. Old responses always validate against their original form — never a newer one. |
| Migrate old responses to a new form version | When you update a form, define what happens to each field from the old version: keep the value, discard it, or compute a new value. The original response is always preserved. |
| Route applicants to the right form | Add a short screening questionnaire before the main form. Answers automatically route the user to the right form version or intake path. |
| Accessibility (WCAG 2.1 AA, Section 508) | The reference web components library targets WCAG 2.1 AA and Section 508 compliance. ARIA attributes, keyboard navigation, focus management, and validation announcements are built into every component — not bolted on after the fact. |
| Design system adapters (USWDS, others) | A USWDS adapter ships out of the box for federal agency branding. The headless adapter architecture lets anyone plug in Bootstrap, Tailwind, Material, or a custom design system — same behavior, different DOM. |
| Design control (tokens, widgets, layout) | Full design control: color tokens, typography, spacing, and layout. 34 built-in components. Apply a theme without changing the form itself. |
| Build forms with AI | Describe what you need in plain language. An AI chat builder creates the form live. Also integrates with AI coding assistants via 28 structured tool actions. References and Ontology sidecars give AI agents domain-specific grounding — agents query authoritative sources, not training data. |
| Help people fill out the form | The Assist protocol surfaces contextual help, regulatory guidance, and field explanations to anyone filling out your form — human or AI agent. A browser extension (Formy) provides semantic autofill, cross-form data reuse, and form memory. No LLM required for basic agent interoperability. |
| Extend forms with custom types and rules | Declare new data types, validation constraints, and functions as JSON extensions. Publish them in a shareable registry. Enable on any field with one property — no code changes needed. |
| Contextual help and regulatory guidance per field | Attach documentation, compliance references, knowledge base articles, and AI agent data stores to any field or section. Multiple reference documents for different audiences, languages, or domains — all additive, none modify the form. |
| Semantic interoperability with external standards | Bind form fields to external ontologies — FHIR, schema.org, ICD-10, Dublin Core, and more. Two independently authored forms that align to the same concept can have their data mechanically merged. No guesswork, no column-name matching. |
| Multi-language forms | Provide translated labels, help text, error messages, and option labels via locale sidecar documents. Multiple locales per form, independently versioned. Add a language without touching the form definition. |
| No vendor lock-in | Free and open-source (AGPL-3.0 license). Your form definitions are portable JSON files you own. No proprietary format, no lock-in. |
| Static linting before deployment | Catch errors before you publish. A static checker validates your form's logic, references, and structure — so users never see a broken form. |
Open-source, auditable, yours to own.
Formspec is free and open-source under the AGPL-3.0 license. Your form definitions, response data, and validation rules are portable JSON files — not locked inside a proprietary platform.
No per-seat pricing, no usage tiers
Free for every team, every form, every response.
Auditability
Regulated industries can inspect every line of logic. The specification is public. Validation behavior is testable end to end.
No lock-in
Form definitions are JSON documents conforming to a published spec. Move between implementations, host on your own infrastructure, or build custom tooling against the spec.
Community extensions
Extension registries are plain JSON files you can check into a repo, fork, audit, or vendor. No gatekeepers, no app store — just publish and share.
Compliance posture
Formspec runs client-side by default. No form data passes through Formspec servers. Your hosting environment, not Formspec, determines your compliance boundary.
WCAG 2.1 AA & Section 508
The reference web components library targets WCAG 2.1 AA conformance and Section 508 compliance. Every built-in component ships with semantic ARIA attributes, keyboard navigation, focus management, and live validation announcements. Accessibility behavior is handled by the engine — not the adapter — so every design system integration inherits it automatically.
Native mobile and responsive web
Native renderers for iOS (SwiftUI) and Android (Jetpack Compose) run the same form definition with the same validation — offline, on-device. Web forms are responsive by default, adapting to phone, tablet, and desktop viewports. React apps get dedicated hooks and an auto-renderer.
Design system adapters
A USWDS adapter ships out of the box for federal agencies that need to match government design standards. The headless adapter architecture separates behavior from DOM — swap in Bootstrap, Tailwind, Material, or your own design system. The React package supports component map overrides (e.g., Shadcn). Every adapter inherits the same ARIA, validation, and keyboard behavior automatically.
13 built-in types — from plain text to money and signatures.
Every common data type ships built in. Need something more specialized? Extensions add email, phone, SSN, and more — see below.
Text & Numbers
Single-line, multi-line, integers, decimals, and URIs. Automatic whitespace cleanup before storage.
Dates & Times
Date only, date+time, or time only. ISO 8601 storage. Date arithmetic in expressions: difference in years/months/days, component extraction.
Choices
Single-select and multi-select, rendered as dropdown, radio group, or checkbox group. Named option lists defined once and reused across fields.
Money
Money fields store the amount and currency together. String-based amounts eliminate floating-point errors in financial calculations.
Files & Signatures
File upload with drag-and-drop, MIME type filtering, and multi-file support. Canvas signature component with stroke capture — saves as an image.
Ratings & Sliders
Star/icon ratings (configurable icon, optional half-step) and sliders (min/max/step with tick marks).
Anyone can add new field types, constraints, and functions — and share them.
Need an email validator? A phone number formatter? A compliance check specific to your industry? Declare it as a JSON extension, enable it on a field with one property, and publish it for every team in your organization.
One property to activate
Add "x-formspec-email": true to any field's extensions. That single property activates validation, input hints, and display formatting — nothing else to configure.
Declare, don't code
A data type extension is a JSON entry: a validation pattern, input mask, display format, and metadata — one declaration replaces what would otherwise be a custom plugin. Function and constraint extensions declare their signatures the same way.
Five extension categories
Data types add new field kinds (email, phone, SSN). Constraints add validation rules (Luhn checksum for card numbers). Functions add computed values (calculate age from a birth date). Properties attach custom metadata (compliance tags, sensitivity flags). Namespaces group related extensions into installable bundles.
Publish and share
Package extensions into a registry — versioned, with compatibility bounds that prevent breaking changes on upgrade. Your compliance team publishes validated types once; every team in the organization uses them. Extensions follow a formal lifecycle (draft, stable, deprecated, retired) so consumers always know what's production-ready.
Common library included
18 production-ready extensions ship out of the box: email, phone (international and North American), ZIP code, SSN, EIN, credit card, percentage, US currency, URL, hex color code, and more — each with validation built in, plus input hints, display masking, and formatting where appropriate.
Portable by design
Extensions follow the same open JSON format as everything else. Move them between implementations, fork them, or build tooling against them. No vendor lock-in at the extension layer either.
Calculated fields, conditions, and business rules — without code.
Set up calculated fields, show/hide logic, conditional requirements, and read-only rules — all using spreadsheet-style formulas (powered by Formspec Expression Language). No programming required. Power users can write complex expressions; everyone else uses Studio's visual rule builder.
Calculated fields
Build formulas using 61 built-in functions: sums, averages, date math, text operations, and more. Results update in real time as the user types.
Show/hide conditions
Set a condition on any field or section. When false, the field hides and everything inside it hides too. Hidden fields are automatically excluded from validation and output.
Conditional requirements
Make any field required only when another condition is met. "Required when Organization Type is Nonprofit" is a single rule.
Read-only fields
Lock fields with a condition. A locked section locks everything inside it. Calculated fields are automatically read-only.
Precision and power
Decimal-precision math eliminates rounding errors in financial and scientific calculations. Row-by-row calculations across repeating sections — multiply quantity by price in each row, then sum the total. Named variables to reuse intermediate values across fields.
State queries
Check any field's current state — is it valid, visible, read-only, or required? — and use that answer as a condition in other rules.
Field errors and cross-field business rules — structured, not just red text.
Field-level checks and cross-field business rules — with structured results your systems can act on, not just red error text.
Field constraints
A formula that returns true when the value is valid, plus a custom error message. Works with cross-field references: "end date must be after start date."
Cross-field validation rules
Named validation rules that target any field in the form. Each rule has a condition, severity (error/warning/info), a human-readable message, a machine-readable code, and an optional activation condition.
Rule composition
Combine validation rules with and, or, not, and exactly-one. Rules can activate only when another condition is true.
Structured validation report
Every validation run produces a structured report: pass/fail status, every violation with its field, severity, message, and a machine-readable code. Your backend can react to specific violations, not just "the form failed."
Validation timing
Per-rule: continuous (every change), on-submit only, or on-demand. Form-wide mode: validate everything, validate on submit, or never.
Three severity levels
Error blocks completion; warning flags for review without blocking; info provides context. Warnings surface high-risk patterns without stopping the form.
Multi-step wizards, tabbed forms, and 34 built-in components.
Full control over navigation and layout — without touching your form logic.
Wizard navigation
Step-by-step with Previous/Next/Submit, collapsible side nav, progress indicators (completed/active/upcoming). Per-page validation shows errors in context.
Tab navigation
Click-based switching with configurable labels, top or bottom tab bar, and programmatic control.
34 built-in components
34 components across five categories: layout, inputs, display, interactive, and special-purpose — including grids, modals, accordions, data tables, alerts, and more.
Theme files
Separate design configuration with color tokens, typography, spacing, and layout rules. Change the look without touching the form definition.
Responsive design
Forms adapt to phone, tablet, and desktop automatically. Override layout per screen size without writing media queries.
Add rows, nest groups, build tables — all from the definition.
Repeatable groups are first-class citizens, not a workaround.
Data table
A repeatable group rendered as an editable spreadsheet: add/remove row buttons, type-appropriate inputs per column, optional row numbers, computed cells (e.g., line totals).
Repeatable groups
Any group can become repeatable. Users add and remove instances; minimum and maximum number of rows validated automatically. Output is a JSON array.
Nested repeats
A repeatable group can contain another repeatable group. Medical conditions → medications → dosages. Paths resolve correctly at any nesting depth.
Pre-fill from any source. Export to any format.
Formspec is the hub — data flows in from your existing systems and out to wherever it needs to go.
Screener routing
Add a short questionnaire before the main form. Based on answers, automatically route each person to the right form or intake path. First-match logic: emergency → emergency intake, urgent → urgent care, everyone else → standard.
Pre-fill from any source
Connect to EHR, CRM, or any API to pre-fill fields. Data can come from a URL, an inline dataset, or a function your host app provides. Each pre-filled field can be editable or locked. Pre-fill patient demographics, insurance details, or prior responses from your EHR — editable or locked per field.
Named option lists
Define a choice list once, reference it across multiple fields. Update one list; all fields pick it up.
Export mapping
A separate configuration file that transforms responses into your external format. Supports JSON (restructure and rename fields), XML (with namespaces and attributes), and CSV (configurable delimiters and encoding).
Bidirectional transforms
The same mapping works for both import and export. Value translation converts internal codes to external codes and back. Conditional rules skip fields when a guard condition is false.
Reversibility guarantees
Mappings track whether each transformation is reversible. Lossless transforms round-trip automatically; lossy ones require you to define the reverse explicitly.
Every field can carry its own documentation, regulations, and AI data sources.
Forms exist in context — regulatory guidance, help articles, institutional knowledge. The References specification makes that context machine-readable and field-specific.
Human-facing help
Link documentation, worked examples, and regulatory guidance to specific fields. Renderers surface the right help at the right time.
AI agent data stores
Point AI agents to vector stores, knowledge bases, retrieval endpoints, and tool schemas — per field. Agents query authoritative sources instead of guessing from training data.
Audience-aware
Each reference declares its audience: human, agent, or both. Renderers show help links; agents query data stores. Same document serves both.
Composable overlays
Multiple reference documents per form — one for regulatory guidance, one for AI context, one per locale. All merge additively.
Form fields that carry their own meaning — not just labels.
Bind fields to concepts in schema.org, FHIR, ICD-10, or any ontology. Data carries its own context from collection through analysis.
Concept bindings
Tag any field with a concept URI from an external standard. A field isn't just 'EIN' — it's formally identified as an IRS Employer Identification Number, related to FHIR's Organization.identifier.
Vocabulary alignment
Connect option sets to external terminology systems with version tracking. When ICD-10 releases a new version, update one vocabulary binding.
Cross-form alignment
Two independently authored forms that align to the same ontology concept can have their data mechanically merged. No column-name guessing, no manual mapping.
Help people fill out the form — not just build it.
You built a great form. Now the person filling it out is staring at "Employer Identification Number" with no idea what it means, re-typing their address for the third time this week, and wondering if they're doing it right. The Assist protocol closes that gap.
Contextual help at every field
The Assist specification surfaces your References and Ontology metadata to form fillers and AI agents at runtime — regulations, worked examples, and documentation appear when someone focuses a field, not buried in a help page.
Semantic autofill across forms
Fields tagged with ontology concepts can be auto-filled from a user's profile. EIN, organization name, and address carry across every Formspec form — matched by meaning, not by field name.
No AI required
The Assist spec and its implementation are pure structured data. Browser extensions, accessibility tools, and automation scripts get full agent access without any LLM dependency. The conversational chat layer is additive — not foundational.
Browser extension (Formy)
A cross-site browser extension for Chrome and Firefox. Semantic autofill, field-level help in a side panel, form memory (save and restore partial responses), and multi-profile management — all encrypted at rest with WebAuthn.
Works on plain HTML forms too
On Formspec forms, full contextual help and semantic matching. On plain HTML forms, Formy degrades gracefully — matching fields by autocomplete tokens, labels, and input types for basic autofill.
Privacy-first
All profile data stays on-device by default. Encrypted at rest with hardware-backed keys (Touch ID, Windows Hello). Every autofill requires explicit user approval. No telemetry, no cloud sync unless you opt in.
Version-locked forms. Response pinning. Formal migrations.
When a regulated organization changes a form, three questions follow immediately: What was the user shown? Which version? Can existing responses still be validated? Formspec answers all three by design.
Immutable versions
Once published, a form version is locked. Any change produces a new version. Definitions carry a stable URL + version identity pair.
Response pinning
Every submitted response records the exact version it was filled against. Validation always uses the pinned version — never a newer one. This is critical for audit trails in healthcare, financial services, and government.
Formal migrations
For each field, choose: keep the value as-is, discard it, or compute a new value from the old data. Migration produces a new response; the original is always preserved.
Changelog format
Atomic diffs between versions. Each change is classified by impact (breaking, compatible, or cosmetic) so your deployment pipeline can gate on it automatically.
Stop building forms by hand.
Describe what you need. AI builds it. Automatic validation makes sure it's right. One definition deploys to web, React, iOS, and Android. Open source, no vendor lock-in. Your team ships in days, not months.