Skip to content

Feature Request: Support formatting and viewing very large JSON files (>100 MB) #272878

@belaletech

Description

@belaletech

Describe the feature request

Currently, when trying to format or view very large JSON files (e.g., 140 MB) in VS Code using the "Format Document" shortcut (Shift + Alt + F), VS Code shows the message:

"This file cannot be formatted because it is too large."

Even though the JSON file is already formatted, VS Code displays it as one long line for large files, making it very difficult to read or work with.

Proposed Feature

  • Allow formatting of very large JSON files, possibly via a streaming/partial approach.
  • Improve rendering performance for large files so that formatted JSON is displayed correctly.
  • Consider providing a warning or partial formatting for extremely large files instead of disabling formatting completely.

Use Case / Motivation

  • Developers often need to analyze logs, exported data, or API responses that are hundreds of MBs in size.
  • Currently, large JSON files cannot be formatted or viewed properly in VS Code, forcing users to rely on external tools or editors.

Example

  • JSON file size: 140 MB
  • Shortcut used: Shift + Alt + F
  • Expected behavior: File should be formatted or at least partially formatted for readability.
  • Current behavior: VS Code shows "This file cannot be formatted because it is too large" and displays the file as one long line.

Additional context

  • Tested in VS Code version: [provide your version, e.g., 1.88.0]
  • Operating System: Windows 11
Image

Metadata

Metadata

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions