Need help with your JSON?

Try our JSON Formatter tool to automatically identify and fix syntax errors in your JSON. JSON Formatter tool

Keyboard Shortcuts for Efficient JSON Formatting

If you are looking for a single universal shortcut to format JSON, the first thing to know is that there isn't one. The fastest key combination depends on where you are working: VS Code, a JetBrains IDE, or a browser-based formatter all behave differently.

That distinction matters because a lot of shortcut lists on the web are wrong. They mix editor commands, browser commands, and made-up formatter hotkeys. For real productivity, learn one reliable formatting shortcut for your main editor, then add a small set of search and navigation shortcuts around it.

Quick answer

In current official docs, VS Code formats JSON with Shift+Alt+F on Windows, Shift+Option+F on macOS, and Ctrl+Shift+I on Linux. JetBrains IDEs use Ctrl+Alt+L on Windows and Linux, and Command+Option+L on macOS. In browser-based JSON formatters, there is usually no universal default format shortcut, so the fastest keyboard workflow is tabbing to the Format button and triggering it with Enter or Space.

Quick Reference

Where You Work With JSONFormatting ShortcutAlso Worth MemorizingImportant Caveat
VS CodeShift+Alt+F / Shift+Option+F / Ctrl+Shift+ICtrl/Cmd+Shift+O, Ctrl/Cmd+FShown according to your keyboard layout and keymap
JetBrains IDEsCtrl+Alt+L / Command+Option+LCtrl/Cmd+Shift+A, Shift twiceOS or window-manager conflicts are common on Linux and macOS
Browser-based JSON formattersNo standard defaultTab, Enter, Space, Ctrl/Cmd+FThe site has to expose keyboard-focusable controls

A Fast Keyboard Workflow for Browser-Based JSON Formatters

On the web, keyboard efficiency usually comes from standard editing and navigation shortcuts, not from a built-in JSON-specific hotkey. That is especially true when you are using an online formatter for quick, one-off cleanup.

  1. Paste the payload with Ctrl+V or Command+V.
  2. Use Tab or Shift+Tab to move focus to the Format, Validate, or Minify controls.
  3. Activate the focused button with Enter or Space.
  4. Search the formatted output with Ctrl+F or Command+F.
  5. Select everything with Ctrl+A or Command+A, then copy with Ctrl+C or Command+C.

Practical takeaway

If your browser-based formatter does not advertise a dedicated format hotkey, do not assume that Ctrl/Cmd+Shift+F will work. In web apps, that kind of shortcut is often intercepted by the browser or reserved for a completely different action.

For fast one-off cleanup, use the Offline Tools JSON Formatter with the keyboard-first flow above instead of hunting through menus.

Current VS Code JSON Shortcuts

VS Code is one of the most common places people format JSON, so it is worth memorizing the defaults that are actually documented today. These are especially useful when you jump between API responses, config files, and large sample payloads.

ActionWindowsmacOSLinuxWhy It Helps With JSON
Format DocumentShift+Alt+FShift+Option+FCtrl+Shift+IBeautifies minified JSON instantly
Go to Symbol in EditorCtrl+Shift+OCommand+Shift+OCtrl+Shift+OJump to top-level keys in large objects
Trigger SuggestionsCtrl+SpaceControl+SpaceCtrl+SpaceUseful when schema-backed completion is available
Open Keyboard ShortcutsCtrl+K Ctrl+SCommand+K Command+SCtrl+K Ctrl+SLets you bind a shortcut that matches your workflow

If you format JSON constantly, a custom binding is often better than memorizing a generic list from the web. In VS Code, you can target JSON files only and avoid changing shortcuts for every language.

Example VS Code binding for JSON only

Add a custom keybinding for editor.action.formatDocument if you want a single shortcut that only fires when a JSON editor is focused:

{
  "key": "ctrl+alt+j",
  "command": "editor.action.formatDocument",
  "when": "editorTextFocus && editorLangId == 'json'"
}

If you frequently edit VS Code settings or other JSON-with-comments files, use jsonc instead of json.

JetBrains IDE Shortcuts for JSON

WebStorm, IntelliJ IDEA, and other JetBrains IDEs use a consistent formatting flow. The core shortcut is easy to remember, and the action search tools make it faster to recover when you forget a binding.

ActionWindows and LinuxmacOSWhy It Helps With JSON
Reformat CodeCtrl+Alt+LCommand+Option+LFormats the current JSON file or selection
Find ActionCtrl+Shift+ACommand+Shift+ASearch for formatting and validation commands by name
Search EverywhereShift twiceShift twiceFast way to jump to files, actions, and settings

JetBrains also supports formatting on save through Actions on Save. If you touch JSON files all day, that can be more efficient than pressing the reformat shortcut manually every time.

Conflict warning

On some Linux desktops and macOS setups, default JetBrains shortcuts can conflict with system or input-method shortcuts. If Ctrl+Alt+L or Ctrl/Control+Space does nothing, open the keymap settings and rebind it instead of fighting the OS.

What Usually Breaks JSON Formatting Shortcuts

ProblemWhat Is Usually HappeningBest Fix
Nothing happens when you press the shortcutThe editor is not focused, or the browser/OS captured the keys firstClick into the editor, then test again or rebind the command
The file does not format cleanlyThe payload is invalid JSON, or you are working with JSONC rather than strict JSONValidate first, then remove comments or trailing commas if strict JSON is required
The displayed shortcut does not match what you expectedModern editors render shortcuts according to keyboard layout and active keymapCheck the in-app keyboard shortcut editor instead of relying on a cheat sheet
A browser-based formatter has no hotkey for FormatMany web tools expose the command only as a buttonUse Tab plus Enter, or create a custom browser shortcut with an extension or userscript

The Small Shortcut Set That Delivers the Biggest Gain

  • Memorize one format shortcut for your main editor.
  • Memorize one find shortcut so you can inspect large payloads quickly.
  • Memorize one action search shortcut such as VS Code's shortcut editor or JetBrains Find Action for everything else.
  • In browser tools, rely on Tab, Enter, and Ctrl/Cmd+F before you rely on any site-specific hotkey list.

Bottom Line

Efficient JSON formatting is less about memorizing a giant table and more about using the right shortcut in the right environment. VS Code and JetBrains both give you dependable formatting defaults today, while browser-based formatters reward a simpler keyboard workflow built around focus, search, and copy.

Shortcut examples in this guide were checked against the current official VS Code JSON documentation, the VS Code keybindings documentation, and current JetBrains reformatting guidance.

Need help with your JSON?

Try our JSON Formatter tool to automatically identify and fix syntax errors in your JSON. JSON Formatter tool