Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Subnets PreviewNew to Visual Studio Code? Get it now.
Subnets Preview

Subnets Preview

newbmiao

|
1 install
| (0) | Free
Preview v0-subnets JSON in Simple Browser with a short ?c=v1… link. Auto-finds configs; no telemetry.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Subnets Preview

Open your subnet layout JSON in the Visual Subnet Calculator inside Simple Browser — next to your code, with a short shareable ?c=v1… link (same format as Copy Link on the web app).

Quick start

  1. Open a workspace that contains a v0-subnets JSON export (optional).
  2. Command Palette → Subnet: Preview JSON (Cmd+Shift+P / Ctrl+Shift+P).
  3. Simple Browser opens https://v0-subnets.vercel.app/?c=v1… with your layout loaded.

Tip: bind a shortcut to network.subnetPreview.open.

What it does

  • Opens the calculator in Simple Browser (no external browser required).
  • Uses the focused .json when it is a valid v0-subnets export; otherwise finds configs by glob.
  • Builds a compressed preview URL in-process (deflate-raw → ?c=v1…).
  • Falls back to an empty calculator when no config is present (configurable).
  • No telemetry from the extension. Reads workspace JSON locally only.

Which file is opened?

Situation Result
Focused editor has valid v0-subnets JSON That file
No valid JSON focused Latest match of network.subnetPreview.configGlob (default docs/subnet-config-*.json)
Primary glob finds nothing network.subnetPreview.configFallbackGlobs (default **/*subnet-config*.json)
Multiple matches Latest path (sorted); set promptWhenMultiple to pick
No config in workspace Empty calculator if openEmptyWhenMissing is on

Re-run the command after you save JSON changes — an already-open Simple Browser tab does not auto-refresh.

Example JSON

Compatible with exports from v0-subnets.vercel.app:

{
  "networkAddress": "10.0.0.0",
  "maskBits": "16",
  "subnets": [
    {
      "networkAddress": "10.0.0.0",
      "maskBits": 24,
      "prefix": "app-uat",
      "color": "blue"
    }
  ]
}

Minimum shape: networkAddress + subnets[] (each subnet needs networkAddress).

Settings

Setting Default Description
network.subnetPreview.configGlob docs/subnet-config-*.json Primary workspace glob
network.subnetPreview.configFallbackGlobs ["**/*subnet-config*.json"] Extra globs if primary finds nothing
network.subnetPreview.promptWhenMultiple false Show a picker when multiple configs match
network.subnetPreview.openEmptyWhenMissing true Open empty calculator when nothing matches

Privacy & security

Topic Behavior
Telemetry None from this extension
Workspace files Read locally via the VS Code API only
Preview host Fixed to https://v0-subnets.vercel.app/
URL contents Layout data (CIDRs, names/notes, colors) is sent in the query string to load the page — avoid secrets or personal data in notes
Path safety Config must stay inside the workspace; JSON validated and capped at 1 MiB
Errors Generic toasts (no filesystem paths)

Requirements

  • VS Code 1.80+ or Cursor with Simple Browser
  • A workspace folder open (not a single loose file)

Links

  • Calculator: v0-subnets.vercel.app
  • Marketplace: newbmiao.subnets-preview

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft