100% local — your data never leaves your browser

JSON to io-ts Codec Converter — Free Online Tool

Generate io-ts codecs from sample JSON instantly in your browser. Free, private and offline-friendly: your data never leaves your device.

Instant Private Zero cookies

JSON input

io-ts output

Why convert JSON to io-ts?

io-ts gives you runtime validation and static types from a single codec, but writing those codecs by hand for every endpoint is slow. Paste a JSON sample above and receive executable io-ts codecs immediately, with one const per object so the structure mirrors your data.

How it works

The tool parses your JSON in the browser and emits t.type({...}) codecs for each object it discovers. Integers map to t.Int, floats to t.number, strings to t.string, and so on. Nested codecs are declared children-first, and the required import * as t from "io-ts"; is included, so you can drop the output straight into your project. No part of the process touches a server.

Frequently asked questions

Does my JSON leave my computer?
Never. The codecs are generated locally in your browser, so no data is transmitted. That makes the tool a safe choice even for payloads with private information.
What does the generated code look like?
You get io-ts runtime codecs built with t.type({...}), one const per object. Child codecs are declared before their parents so every reference resolves at runtime.
How are numbers and strings typed?
Integers use t.Int, floating-point numbers use t.number, and strings use t.string. The output also includes the import * as t from "io-ts"; line so it is ready to paste.

Related converters