Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@dennisk2025/json-prettifier

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dennisk2025/json-prettifier

Accepts raw/minified JSON text and returns a formatted, pretty-printed version with customizable indentation. Useful for debugging, readability, and working with JSON data.

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

json-prettifier

Accepts raw/minified JSON text and returns a formatted, pretty-printed version with customizable indentation. Useful for debugging, readability, and working with JSON data in Claude Desktop and other MCP-compatible tools.

Installation

You can use this server instantly without installation via npx:

npx @dennisk2025/json-prettifier

Or, install it globally:

npm install -g @dennisk2025/json-prettifier

Adding to Claude Desktop

Add the following to your Claude Desktop config file at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Example configuration:

{
  "mcpServers": {
    "jsonprettifier": {
      "command": "npx",
      "args": ["@dennisk2025/json-prettifier"]
    }
  }
}

Usage

After Claude launches, type /jsonprettifier and you will have access to the following tool:

Tool: prettify-json

  • Description: Takes a JSON string and formats it with the specified indentation level.

Parameters

  • json_string (string, required): The minified or raw JSON string to format.
  • indent (integer, optional, default=2): Number of spaces to use for indentation (0 returns the most compact form, maximum 8).

Example

Input:

Tool name: prettify-json

Arguments:

{
  "json_string": "{\"hello\":\"world\",\"foo\":[1,2,3]}",
  "indent": 4
}

Result:

{
    "hello": "world",
    "foo": [
        1,
        2,
        3
    ]
}

Error handling

If invalid JSON is supplied, the tool returns a clear error message ("Failed to parse JSON ..."). If you supply an argument outside the allowed indent range, it defaults to 2 spaces.

Full Tool List

  • prettify-json
    • Parameters:
      • json_string (string, required): The minified or raw JSON string to format.
      • indent (integer, optional, default=2, min=0, max=8): Indent spaces.
    • Returns: Formatted, pretty-printed JSON as text.

FAQs

Package last updated on 25 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts