Generate JSDoc typedefs from JSON
Generate JSDoc typedefs (@typedef) from JSON, to document and type your JS code.
🔒 100% client-side — no data sent
Generate JSDoc @typedef blocks from a JSON object to document and type your JavaScript code without TypeScript. Nested objects produce separate typedefs and arrays are typed. Instant, local conversion.
What is it for?
- ▸ Document a data structure in JSDoc
- ▸ Type JS without switching to TypeScript
- ▸ Generate @typedef from an API response
- ▸ Improve editor autocompletion
FAQ
How are types inferred?
From the JSON values: string → string, number → number, boolean → boolean, object → nested typedef, array → Type[].
Can I pass a JSON array?
Yes, the first element of the array is used as the template to generate the typedef.
Is my data sent anywhere?
No, the conversion is entirely local in your browser.
Related tools
HTML → JSX Convert HTML into React JSX (class → className, camelCase attributes, style object, comments). JSON · format / validate Format, indent, minify and validate JSON. 100% client-side. JSON · minify Minify JSON (strip whitespace and line breaks) to reduce its size. JSON → TypeScript Generate a TypeScript interface from a JSON object, including nested types. JSON · validator Check whether your JSON is valid and pinpoint the first error precisely. Markdown → HTML Convert Markdown to HTML with a live preview, in your browser.