Skip to content
Back to skills

Json Formatter

ASecurity

Formats and validates JSON data. Use when you need to pretty-print JSON, fix formatting issues, or validate JSON syntax. ALWAYS USE THIS when doing JSON Formatting

  • 666 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added February 9, 2026
tools

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill json-formatter --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Json Formatter?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Json Formatter
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-json-formatter/badge)](https://www.skillsdirectory.com/skills/majiayu000-json-formatter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: json-formatter
description: "Formats and validates JSON data. Use when you need to pretty-print JSON, fix formatting issues, or validate JSON syntax. ALWAYS USE THIS when doing JSON Formatting"
---

# JSON Formatter

## Instructions

When asked to format, validate, or prettify JSON:

1. Identify the JSON data (raw, minified, or malformed)
2. Parse and validate the structure
3. Return properly formatted JSON with:
   - Consistent 2-space indentation
   - Proper line breaks
   - Valid syntax

## Examples

### Example 1: Minified JSON
**Input:**
```json
{"name":"John","age":30,"city":"New York","hobbies":["reading","gaming"]}
```

**Output:**
```json
{
  "name": "John",
  "age": 30,
  "city": "New York",
  "hobbies": [
    "reading",
    "gaming"
  ]
}
```

### Example 2: Validating JSON
If JSON is invalid, explain the issue and suggest a fix:
```json
{"incomplete": "data",}  // trailing comma
```

**Response:** "Invalid JSON: Trailing comma after last property. Remove the comma before the closing brace."

## Best Practices

- Use 2-space indentation for consistency
- Sort object keys alphabetically when helpful
- Validate before formatting
- Preserve original data types (strings, numbers, booleans, null)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.