How do I convert JSON to io-ts?
Paste your JSON sample into the editor on this page. The io-ts output updates live β copy it or download a .ts file.
Generate io-ts codecs from JSON instantly. Build runtime-safe TypeScript validators for APIs, fp-ts projects and functional applications with browser-based.
Paste or edit your JSON sample
Functional runtime decoders
import * as t from 'io-ts';
export const RootCodec = t.type({
id: t.number,
name: t.string,
email: t.string,
active: t.boolean,
score: t.number,
tags: t.array(t.string),
profile: t.type({
age: t.number,
city: t.string,
}),
});
export type Root = t.TypeOf<typeof RootCodec>;io-ts decoders validate unknown JSON at boundaries in functional TypeScript apps.
This page presets io-ts output so you can paste API JSON and ship typed code faster.
Paste your JSON sample into the editor on this page. The io-ts output updates live β copy it or download a .ts file.
Yes. JSON to io-ts conversion on WebioTools is free for normal usage and runs in your browser.
No. Code generation happens locally in your browser. Your JSON never leaves your device.
Absolutely. Paste REST or GraphQL JSON responses to scaffold io-ts definitions for your project.