Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Nifty Paste JSON as Code: JSON to TypesNew to Visual Studio Code? Get it now.
Nifty Paste JSON as Code: JSON to Types

Nifty Paste JSON as Code: JSON to Types

Nifty

|
39 installs
| (0) | Free
Turn JSON on your clipboard into types for TypeScript, C#, Go, Rust, Python, Java, Kotlin, Swift, Dart and more.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nifty Paste JSON as Code

Turn JSON on your clipboard into types for TypeScript, C#, Go, Rust, Python, Java, Kotlin, Swift, Dart and more.

Maintained. No sign-in. No telemetry. Works in VS Code, Cursor, Windsurf, VSCodium and other editors that use Open VSX.

Features

An order API response copied, then pasted into a TypeScript module with Ctrl+Alt+V and named Order, becoming typed interfaces

An order API response pasted as TypeScript interfaces at the end of an API module

A weather API response pasted as Go structs with json tags, with "time" added to the import block

An order response opened as C# classes beside the JSON

  • Paste JSON as Code (Ctrl+Alt+V, or Cmd+Alt+V on Mac). Copy an API response, press the shortcut in a .ts, .cs, .go or other file, and get matching types at the cursor, in that file's language and indentation. In Go files, needed imports go into the file's import block.
  • Open JSON as Code. In a JSON file (or with some JSON selected), right-click and pick any language; the types open beside it.
  • 16 targets: TypeScript, TypeScript + Zod, C#, Go, Rust, Python, Java, Kotlin, Swift, Dart, PHP, Ruby, C++, Elm, Flow and JSON Schema.
  • Smart inference. Nested objects become their own types, arrays are merged, optional fields, dates and maps are detected.
  • Plain types by default. Turn off nifty.paste-json.justTypes to also get JSON (de)serialisation helpers.
  • Offline. Everything runs locally with the open-source quicktype engine.
  • Works in the browser on vscode.dev and github.dev.

Commands

Command Key What it does
Nifty: Paste JSON as Code Ctrl+Alt+V Paste clipboard JSON as types in the current file's language
Nifty: Open JSON as Code… Generate from the JSON file, selection or clipboard in any language

Settings

Setting Default What it does
nifty.paste-json.justTypes true Plain types only (no serialisation helpers)
nifty.paste-json.askForName true Ask for the top-level type name

Install

  • VS Code: search for "Nifty Paste JSON as Code" in the Extensions view, or install from the Visual Studio Marketplace.
  • Cursor, Windsurf, VSCodium, Kiro, Antigravity: install from Open VSX.

Credits

Code generation by quicktype (Apache-2.0).

Privacy

This extension collects no telemetry, needs no account and makes no network requests.

More Nifty tools

  • Nifty C# Templates: New Class, Record & Namespace: New C# class, interface, record, enum, test and controller files with the right namespace, plus namespace syncing. (Open VSX)
  • Nifty Diagrams: PlantUML, Graphviz & D2 Preview: PlantUML, Graphviz (DOT) and D2 diagrams rendered on your machine: live preview beside the editor, SVG and PNG export, diagrams in the Markdown preview, errors in Problems. No server needed. (Open VSX)
  • Nifty Docstrings: Doc Comments for Python, PHP, Rust and Go: Type three quotes under a Python function and get a Google, NumPy or Sphinx docstring with its arguments, types, returns and raises. PHPDoc, Rust and Go doc comments too. (Open VSX)
  • Nifty JSON Schema: Validate with Draft 2020-12 & 2019-09: Validate JSON, JSONC and YAML against JSON Schema 2020-12, 2019-09, draft-07, 06 and 04, with precise errors, hover, completion, SchemaStore lookup and schema generation. (Open VSX)
  • Nifty Mermaid: Mermaid Diagram Preview & Export: Mermaid diagrams with no account: live preview beside .mmd files and Markdown, diagrams in the Markdown preview, syntax highlighting, and export to SVG or PNG. (Open VSX)
  • Nifty Nginx: nginx.conf Formatting & IntelliSense: nginx config support: syntax highlighting, formatting, directive completion and docs on hover, context checks, and snippets for reverse proxies, SSL and PHP. (Open VSX)

See all 100+ Nifty extensions and web tools at https://getnifty.dev

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft