Overview
Paste JSON, get real types. TypeScript & Go free, 5 more premium: Python, Rust, C#, Kotlin, Java. Your pasted JSON is not uploaded.
JSON to Types — paste a JSON sample, get real type declarations, entirely on your device Paste any JSON — an API response, a config file, a fixture — and instantly see matching type declarations in your language: a TypeScript `interface`, a Go `struct` with json tags, and (premium) a Python `dataclass`/`TypedDict`, a Rust `serde` struct, a C# class, a Kotlin `data class`, or a Java `record`. Generated live as you paste, right in the popup — the JSON you paste is never uploaded anywhere. THIS IS NOT A FORMATTER OR A DATA CONVERTER It does not pretty-print, validate, or reformat your JSON, and it does not convert your data into CSV/YAML/another serialization format. Its only output is TYPE DECLARATIONS — source code you paste into your own project. WHY NOT JUST HAND-WRITE THEM Hand-writing type declarations from a JSON sample is slow and error-prone — nested objects need their own named types, arrays need an element type, optional fields are easy to miss. This tool does the recursive part for you: nested objects become named nested types, a root array infers its shape from its own elements, and everything is generated on-device, so the response body you just pasted (which may carry real user data) never leaves your browser the way it would with a web-based converter. HONEST ABOUT WHAT A SAMPLE CAN AND CAN'T TELL YOU Type inference from a JSON sample is an ESTIMATE, not a derivation from a real schema, and this tool says so rather than pretending otherwise: - A field that is `null` in your sample has an UNKNOWN type — it is emitted as an explicit unknown/nullable form (`unknown` in TypeScript, `Any` in Python, `interface{}` in Go, ...) with a note, never silently guessed as `string`. - With a SINGLE pasted sample, every present field is emitted as required — one sample cannot show you which fields are ever absent from the real API. Paste several samples of the same shape (premium) and a field missing from some of them is marked optional instead, honestly labeled as "absent in some of your samples," not a guarantee about the live API. The same honest standard already applies within a single paste, too: a root JSON ARRAY infers its shape from its own elements, so if your one pasted array already shows a field missing from some elements, that is real evidence inside that ONE sample, and it is marked optional there as well. - A mixed-type array (`[1, "a"]`) produces an honest union (`(number | string)[]` in TypeScript, `interface{}` in Go with a note, ...) — never just the first element's type. - A `null` that appears INSIDE an array — `[1, null, 2]` — keeps its nullability in the element type (`(number | null)[]`, `[]*int64`, `List<long?>`, `Vec<Option<i64>>`, ...), with a note. It is not quietly flattened into a type that cannot hold the null your own sample contains. - JSON has one number type, and the number type you get is decided from the DIGITS YOU ACTUALLY PASTED, not from a rounded-off copy of them. A number becomes an integer type only when every value at that position is whole, is written in integer form (`42` — not `42.0` and not `1e3`), and fits in a signed 64-bit integer. That includes big 64-bit API ids and snowflakes above 9007199254740991: those go into a real 64-bit integer that holds them exactly (with a note that JavaScript's own `JSON.parse` would not). A number written with a decimal point or an exponent gets a floating-point type with a note saying why. And a number that NO fixed-width type can hold — bigger than a 64-bit integer, too large for a double (`1e400`), or written with more digits than a double can carry — gets your language's raw JSON-number type (`json.Number`, `serde_json::Number`, `JsonElement`, `BigDecimal`, Python's unbounded `int`) so the exact digits survive, rather than a floating-point field that would quietly round or overflow it. Even a clean integer is disclosed as an estimate from your sample: the real field may still take a fractional value in data you haven't pasted. - Duplicate keys in your JSON (`{"a":1,"a":"str"}`) are allowed by the JSON spec and are NOT quietly resolved for you. Every occurrence is read, the field becomes an honest union of what was there, and a note spells out that the decoders genuinely disagree — JavaScript and Go keep the last one, .NET binds them in order so the first decides and a later mismatch throws, Rust's serde rejects the document outright. No generated type can round-trip such a document faithfully, and the tool says so instead of pretending. A generator that quietly guesses is worse than one that tells you it can't be sure. This tool is built to do the latter. WHAT IT DOES (FREE) - Paste JSON, get live TypeScript (`interface`) or Go (`struct` with json tags) — updates as you type, no button to click. - Recursive inference: nested objects become named nested types, arrays infer their element type, a root array infers from its own elements. - Editable root type name (default `Root`); nested type names are derived from their key, and two different shapes that would otherwise collide on a name are automatically disambiguated. - Every JSON key is handled safely, however it's spelled — hyphens, leading digits, empty strings, emoji, even a key literally named `__proto__` — sanitized into a valid identifier in your language, never silently dropped. - One-click copy or download of the generated code. PREMIUM ($15 one-time) - Five more languages, each using that ecosystem's standard serialization approach: Python (`dataclass` or `TypedDict`), Rust (`serde`), C# (`System.Text.Json`), Kotlin (`kotlinx.serialization`), and Java (records + Jackson). - Per-language style toggles: Go json tags on/off, Python `dataclass` vs `TypedDict`, TypeScript `interface` vs `type`. - Multi-sample inference — paste several samples of the same shape and a field missing from some of them is marked optional, backed by real evidence across your samples rather than a single-sample guess. This records that the field was absent from some of YOUR samples; it is not a claim that the field is optional in the real API. - Saved schema history, stored locally on your device. No subscription, no account required — pay once, keep the features.
0 out of 5No ratings
Details
- Version0.1.1
- UpdatedJuly 31, 2026
- Size92.34KiB
- LanguagesEnglish
- DeveloperSourwood Labs LLCWebsite
212 West Troy Street STE B Dothan, AL 36303 USEmail
sourwoodlabsllc@gmail.comPhone
+1 334-510-4246 - TraderThis developer has identified itself as a trader per the definition from the European Union and committed to only offer products or services that comply with EU laws.
Privacy
This developer declares that your data is
- Not being sold to third parties, outside of the approved use cases
- Not being used or transferred for purposes that are unrelated to the item's core functionality
- Not being used or transferred to determine creditworthiness or for lending purposes
Support
For help with questions, suggestions, or problems, visit the developer's support site