Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

JSON Toolkit

Henrique ManducaHenrique Manduca133 downloads

Format, minify, and manipulate JSON, JSONC, and JSON5 payloads with comments and flexible syntax support.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

A powerful and lightweight JSON formatting, minification, and manipulation plugin for Obsidian.

Supports both standard strict JSON and flexible formats (comments, trailing commas, unquoted keys, hexadecimals) using dynamic parsing engines (JSONC and JSON5).


Features

  • Dynamic Engine Switching:
    • JSONC (jsonc-parser): VS Code's parser that performs surgical AST-based formatting, preserving single-line (//) and multi-line (/* */) comments as well as trailing commas.
    • JSON5 (json5): Serializes relaxed JSON5 syntax including unquoted keys, single-quoted strings, hexadecimals, and trailing commas.
  • Selection & Block Formatting:
    • JSON: Format Selection: Formats the selected text in the active note.
    • JSON: Format Block under Cursor: Automatically detects the surrounding ```json, ```jsonc, or ```json5 code block and formats its inner content while preserving Markdown fence delimiters.
  • Minification:
    • JSON: Minify Selection / Block: Strips whitespace and comments, producing compact machine-readable payloads. Supports selection or cursor-targeted block fallback.
  • Detailed Syntax Error Reporting:
    • Syntax errors display informative notifications with exact line and column numbers.
  • Customizable Formatting:
    • Configurable indent size (2 spaces, 4 spaces).
    • Tab indentation support.
    • Alphabetical key sorting (Sort Keys).
    • Optional success notifications.
  • High Performance & Mobile Ready:
    • Zero native Node dependencies; 100% compatible with Obsidian Desktop and Mobile (iOS/Android).
    • Bundle size < 60 KB.

Engine Comparison

Feature JSONC (jsonc-parser) JSON5 (json5)
Comments (//, /* */) Preserved intact via edits Comments stripped on re-serialization
Unquoted Keys No (strict key quotes) Yes (e.g. { key: 1 })
Single-Quoted Strings No Yes (e.g. 'string')
Hexadecimal / Infinity / NaN No Yes (e.g. 0xFF)
Trailing Commas Yes Yes

Commands

  • JSON: Format Selection: Formats selected JSON text.
  • JSON: Format Block under Cursor: Locates the enclosing Markdown JSON code block and formats it.
  • JSON: Minify Selection / Block: Minifies selected JSON or the code block under the cursor.

Settings

Open Settings -> Community Plugins -> JSON Toolkit:

  • Active parser engine: Select default engine (JSONC or JSON5).
  • Indent size: 2 or 4 spaces.
  • Use tabs: Toggle tab-based indentation.
  • Sort keys: Toggle recursive alphabetical key sorting.
  • Notify on success: Toggle success notices.

Development & Testing

# Install dependencies
npm install

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Build production bundle
npm run build

# Run complete quality checks
npm run check

License

MIT

HealthExcellent
ReviewPassed
About
Format and minify JSON directly in notes using selectable JSONC or JSON5 engines. Preserve VS Code-style comments and trailing commas with JSONC, or serialize relaxed JSON5 syntax (unquoted keys, single quotes, hex) with JSON5. Report exact syntax errors and operate on selections or fenced JSON blocks.
JSONFormatting
Details
Current version
0.1.1
Last updated
3 weeks ago
Created
3 weeks ago
Updates
2 releases
Downloads
133
Compatible with
Obsidian 1.12.7+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
Henrique ManducaHenrique Manducahenriquemanduca
GitHubhenriquemanduca
  1. Community
  2. Plugins
  3. JSON
  4. JSON Toolkit

Related plugins

Admonition

Admonition block-styled content.

Linter

Format and style your notes. Linter can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular Markdown contents like list, italics, and bold styles; and more with the use of custom rule options.

Editing Toolbar

The Editing Toolbar is modified from cMenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.

Image Captions

Add captions to images with inline Markdown and link support. The caption format is compatible with the Commonmark spec and other Markdown applications.

Sort and Permute lines

Sort and Permute lines in whole file or selection.

Colored Text

Color the selected texts.

PanGu

Add spaces between Chinese characters and English alphabet. A boon for typographically compulsive people.

Advanced PDF Export

Export notes as pixel-perfect PDFs with live preview, style presets, manual page breaks, tables, and full layout control.

Logstravaganza

A simple proxy for `console.*()` calls which copies log messages and uncaught exceptions to a note.

Blur

Create obfuscated blocks of text.