On Windows:    Shift + Alt + F  
On Mac:        Shift + Option + F  
On Linux:      Ctrl + Shift + I  

Original answer How do you format code in Visual Studio Code (VSCode)?

I'm adding it here because when I was looking for it I found your post before the other one. Hope it helps.

Answer from manuelbcd on Stack Overflow
🌐
Visual Studio Code
code.visualstudio.com › docs › languages › json
Editing JSON with Visual Studio Code
November 3, 2021 - Servers like JSON Schema Store provide schemas for most of the common JSON-based configuration files. However, schemas can also be defined in a file in the VS Code workspace, as well as the VS Code settings files. The association of a JSON file to a schema can be done either in the JSON file itself using the $schema attribute, or in the User or Workspace settings (File > Preferences > Settings) under the property json.schemas Open in VS Code Open in VS Code Insiders . VS Code extensions ...
Discussions

VS Code Extension - Best approach for extending JSON - Stack Overflow
I'm looking into what would be the best option to extend VS code with an extension which add some more features to the JSON Format such as additional keyword highlighting. What would be the best More on stackoverflow.com
🌐 stackoverflow.com
What JSON formatter does Visual Studio Code use to format JSON? - Stack Overflow
What underlying JSON formatter does Visual Studio Code use? Is it available to use as a command line tool outside of Visual Studio Code? ... Find the source code for the extension you're interested in. In this case, it's a builtin VS Code extension, so see https://github.com/microsoft/vscode/tre... More on stackoverflow.com
🌐 stackoverflow.com
Any good JSONL viewer and editor extensions?
They never display nicely. I ended up either ripping the lines into individual jsons or with larger datasets hurling it into a jsonb column in PostgreSQL and running queries against that. The LLM doesn’t care if it’s json/l but too much at a time will cause context drift and data misses. What do you need to do? More on reddit.com
🌐 r/vscode
5
6
October 4, 2025
Recommend cool extensions here 👇
Here are my not so standard extensions list: Auto Close Tag (automatically close html tags) Auto Rename Tag (automatically replace paired xml/html tag) Batch Rename (handy tool to rename multiple files at once by using the editor for what their new file name should be) Better Align (allows to align at a certain indent depending on another variable name) Better Comments (handy highlight for comments) Coverage Gutters (show lcov/xml coverage in the gutter for when you write your tests and want to know what lines are already covered or not) Document This (use /**+enter and it generates your comment setup for a function and its parameters) Error Gutters (show errors in the gutter, looks a bit cleaner imo) Explorer Exclude (exclude files from the file tree. Can easily toggle to show/hide them for when you do want them, keeps things uncluttered, which you do with Peek Hidden Files) Highlight Matching Tag (highlights matching tags in HTML/JSX) Inline Parameters (show types/property of a function parameter. It adds a tone of text to the IDE but I like how it makes it a lot less like a black hole what your external functions require, though I did tune the styling to make it less attention seeking) Ligatures Limited (show only ligatures when it makes sense. For when you use ligatures in your fonts to make stuff like => look like an actual arrow but not when its like inside a regex) Multiple Cursor Case Preserve (when you have multiple cursors and text selected, it keeps the same case for all replacements. Very handy when you import a class but also have values that need to be renamed from the instance) Pretty Typescript Errors (makes them easier to read and understand) Rainbow CSV (different colors per column value) Rainbow Tags (makes it easier to see what HTML tag belongs with another) Sort JSON Objects (sort object keys inside JSON so its easier to find your values) Sort Lines (select a bunch of text and have the rows sorted) SVG (all in one extension for viewing and editing SVG) TabOut (easily tab out of quotes and brackets) Template String Converter (converts ' to ` when you start using ${ inside your template strings. VSCode Animations (nice animations for various VSCode actions. Makes it easier on the eyse what changes where) Other than that I basically use the extensions specific to my projects (Angular, NPM, ESLint, etc). More on reddit.com
🌐 r/vscode
10
13
December 27, 2023
🌐
Medium
medium.com › @tomasbouda › 24-best-vs-code-extensions-for-2024-11c8c3620be7
24 Best VS Code Extensions for 2024
January 2, 2024 - If you don’t know hjson, definitely ... to json or yaml. XML Tools — Provides XML formatting, tree view, XPath evaluation, XQuery linting and execution, and code completion features. code --install-extension ms-dotnettools.csharp code --install-extension ms-vscode.PowerShell ...
🌐
Prismic
prismic.io › blog › top-vscode-extensions
Top 15 VSCode Extensions in 2026 - Full List
September 11, 2024 - Prettify JSON has over 2 million installs and is a top tool solution for developers who need to quickly clean up JSON files within their coding environment. Quickly see what imports are bloating your application.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
JSON Parser - Visual Studio Marketplace
Extension for Visual Studio Code - A comprehensive JSON tool for Visual Studio Code that provides essential JSON operations including formatting (prettify/minify), validation, key sorting, and string conversion. Perfect for developers working with JSON data - transform, validate, and format JSON with convenient keyboard shortcuts and
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
JSON formatter - Visual Studio Marketplace
Extension for Visual Studio Code - Convert file to file type json and format content.
Find elsewhere
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
JSON Crack - Visual Studio Marketplace
October 15, 2025 - Extension for Visual Studio Code - Visualize your JSON data into diagrams.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
JSON Viewer - Visual Studio Marketplace
Extension for Visual Studio Code - Preview JSON as tree view on VSCode
🌐
elmah.io
blog.elmah.io › best-visual-studio-code-extensions
Top 25 Best Visual Studio Code (vscode) Extensions
February 11, 2022 - Pasting JSON as C# (or one of the other supported languages) is probably not something you need to do every day. But when you do, this is such a nice little util. I have used Windows PowerShell ISE to edit PowerShell files for years. That changed when Microsoft launched official PowerShell support for Code. The extension is superior to PowerShell ISE in most ways with support for both syntax highlighting, find references and debugging.
🌐
GitHub
github.com › microsoft › vscode › blob › main › .vscode › extensions.json
vscode/.vscode/extensions.json at main · microsoft/vscode
// for the documentation about the extensions.json format · "recommendations": [ "dbaeumer.vscode-eslint", "editorconfig.editorconfig", "github.vscode-pull-request-github", "ms-vscode.vscode-github-issue-notebooks", "ms-vscode.extension-test-runner", "jrieken.vscode-pr-pinger", "typescriptteam.native-preview", "ms-vscode.ts-customized-language-service" ] }
Author   microsoft
🌐
Stack Overflow
stackoverflow.com › questions › 49982830 › vs-code-extension-best-approach-for-extending-json
VS Code Extension - Best approach for extending JSON - Stack Overflow
Taking over the tmlanguage file for JSON and add additional options for eg syntax highlighting connected to a new language ? ... Tnx in advance for giving advice what would be the best approach. ... It depends on what features do you want and how much time you would like to spend on it. If the syntax highlighting is the main purpose, just get a tmLanguage file for the programming language and use the official generator yocode to create an extension from it.
Top answer
1 of 1
2

Here's how to find the info you're looking for

  • Find the source code for the extension you're interested in. In this case, it's a builtin VS Code extension, so see https://github.com/microsoft/vscode/tree/main/extensions. There, you'll see the json-language-features subdirectory.
  • Open https://github.dev/microsoft/vscode
  • Open the Search view and expand the Search Details
    • In "File to include", put "extensions/json-language-features/**/*.ts".
    • Enable regex mode and in the search field, put \bformat\b.
  • Learn that in jsonServer.ts, there's an onFormat function that makes a call to languageService.format, where languageService comes from getLanguageService, which comes from the vscode-json-languageservice package.
  • Look at microsoft/vscode-json-languageservice/jsonLanguageService.ts and learn that getLanguageService returns an object containing format: (document: TextDocument, range: Range, options: FormattingOptions) => format(document, options, range),, where format comes from import { format } from './utils/format';.
  • Look at microsoft/vscode-json-languageservice/utils/format.ts and learn that format calls formatJSON, where that comes from import { format as formatJSON, Range as JSONCRange } from 'jsonc-parser';.
  • Look at microsoft/vscode-json-languageservice/package.json's "dependencies" field, and see that it depends on the jsonc-parser package.

So to answer your questions:

  1. What underlying JSON formatter does Visual Studio Code use?

https://www.npmjs.com/package/jsonc-parser

  1. Is it available to use as a command line tool outside of Visual Studio Code?

Yes. Use it in the same way that microsoft/vscode-json-languageservice uses it. Add it as a dependency of a JS project in the same way you'd depend on any other NPM package.

  1. How does it differ from jq? https://stedolan.github.io/jq/

Well, for one thing, it supports JSON with comments, which jq doesn't (see https://github.com/stedolan/jq/wiki/FAQ#processing-not-quite-valid-json and JQ issues with comments on Json file).

🌐
GitHub
github.com › dutchigor › json-grid-viewer
GitHub - dutchigor/json-grid-viewer: VSCode extension for viewing JSON files in a hierarchical grid format · GitHub
VSCode extension for viewing JSON files in a hierarchical grid format - dutchigor/json-grid-viewer
Starred by 48 users
Forked by 19 users
Languages   Vue 44.3% | JavaScript 35.6% | CSS 20.1%
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Json Editor - Visual Studio Marketplace
Extension for Visual Studio Code - Generate a tree view editor of the active JSON document
🌐
Reddit
reddit.com › r/vscode › any good jsonl viewer and editor extensions?
r/vscode on Reddit: Any good JSONL viewer and editor extensions?
October 4, 2025 -

I'm doing a bunch of LLM evals for my work where everything is JSONL format.

Is there a good plugin that lets me view the data as a table and edit it? None of the ones in the marketplace have screenshots.

🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
JSON Utilities Extension Pack - Visual Studio Marketplace
July 24, 2024 - Extension for Visual Studio Code - Popular Visual Studio Code extensions for JSON Utilities
🌐
Jondjones
jondjones.com › architecture › frameworks › visual-studio-code › tips-for-working-with-json-in-visual-studio-code
Tips for working with JSON in Visual Studio Code - Jon D Jones.
December 18, 2022 - Out-of-the-box, it is obviously possible to view JSON files in VS-code directly. Personally, I find this view OK to quickly scan a simple JSON document, however, I find it much easier to drill into a more complex JSON object using JSONViewer. As seen below, this extension gives you a new view ...