Workbench / JSON workbench

JSON workbench

Validate and format a payload or infer a TypeScript type from sample data.

Source editor

Output

Reading the result

Formatting preserves numeric tokens and duplicate keys. Type inference describes the provided sample. An empty array produces Array<unknown>. Arrays with mixed records produce a union. Duplicate object keys follow JSON.parse semantics for inference, so the last occurrence supplies the type.

Press Ctrl+Enter or ⌘+Enter to update. Edits are saved in this browser when local storage is available.