Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>.NET Secrets ExplorerNew to Visual Studio Code? Get it now.
.NET Secrets Explorer

.NET Secrets Explorer

Berezhnyk

|
2 installs
| (2) | Free
Browse, edit, and search all .NET user secrets (secrets.json) on your machine — as raw JSON or an editable table.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

.NET Secrets Explorer

A VS Code extension to browse, edit, and search every .NET user secrets file (secrets.json) on your machine — the files managed by dotnet user-secrets, stored under %APPDATA%\Microsoft\UserSecrets (Windows) or ~/.microsoft/usersecrets (macOS/Linux).

Editable table view of a secrets.json file

Searching every secret on the machine

Features

  • Dedicated Activity Bar view listing all secrets files in two groups:
    • Workspace projects — resolved from <UserSecretsId> in the open workspace's .csproj files, shown by project name (with a one-click "Create secrets.json" for projects that don't have one yet).
    • Other secrets on this machine — every remaining UserSecrets folder, shown by GUID.
  • Two editors per file:
    • Raw JSON — the normal text editor.
    • Table view — flattened Section:Key rows (the .NET configuration convention). Handles both nested JSON and the flat colon keys the CLI writes. Cells are editable inline; rows can be added and deleted. Edits go through the document, so dirty state, Ctrl+Z undo and Ctrl+S save all work as usual, and formatting/comments in the file are preserved.
  • Double-click a table cell to jump to the raw JSON with that secret's name or value selected, depending on which cell you double-clicked. (Single click still edits inline after a short delay; each row also has a { } button.)
  • Search all secrets (search icon in the view, or ".NET Secrets: Search All Secrets" in the Command Palette): fuzzy-search every key and value across every file on the machine; picking a result opens the raw JSON with the value selected.
  • Table filter box for narrowing rows within one file.
  • Live refresh when files change on disk — e.g. after running dotnet user-secrets set in a terminal.

Development

npm install
npm run build     # bundle extension + webview into dist/
npm test          # vitest unit tests for the pure core (flatten/edit/locate)
npm run check     # tsc --noEmit

Press F5 in VS Code to launch the Extension Development Host.

Architecture notes

  • src/core/ is pure TypeScript (no vscode imports): flattening, editing and token-locating logic built on jsonc-parser, fully unit-tested.
  • The table is a CustomTextEditorProvider (priority: "option"), so the underlying TextDocument stays the single source of truth.
  • Because CLI-written files use flat keys that already contain colons ({"A:B": "x"}) while hand-edited files nest ({"A": {"B": "x"}}), every row tracks its real JSON path separately from the displayed flattened key.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft