Package Control

The official Sublime Text package manager.

Json5Formatter

By RAMBOO1990
Created July 9, 2026, last updated July 21, 2026.

JunMayAprMarFebJan Dec2025 NovOctSepAugJul 2026-W30 | installs: 38 | removals: 11 | upgrades: 0 2026-W30 | installs: 38 | removals: 11 | upgrades: 0 2026-W30 | installs: 38 | removals: 11 | upgrades: 0 02040 WeeklyInstalls 024 WeeklyUpgrades 2026-W30 | upgrades: 0 1.0.0
Installations: 38 in total
Installations minus removals
Upgrades

Links

Version

1.0.0 (>ST4199) ·
2026-07-21 12:40

English | 中文

Json5Formatter

A Sublime Text plugin that formats JSON/JSON5 files using the system Python's json5 library.

Features

Command Description
JSON5: Format as JSON Format and output standard JSON, preserving comments
JSON5: Format as JSON5 Format as JSON5 style (comments not preserved)
JSON5: Minify Compress to single-line JSON

Installation

Prerequisites

Manual Install

Sublime Text 4

cd <Packages directory>   (Preferences → Browse Packages...)
git clone git@github.com:RAMBOO1990/sublime-json5.git "Json5Formatter"

Usage

Command Palette

Press Ctrl+Shift+P, type JSON5:, and select the desired command.

Key Binding

Keys Command
Ctrl+Shift+J Format as JSON

Customize in Default.sublime-keymap.

Settings

Preferences → Package Settings → Json5Formatter → Settings

{
    // Number of spaces per indent level
    "indent": 4,
    // Sort object keys alphabetically
    "sort_keys": false,
    // Escape non-ASCII characters
    "ensure_ascii": false
}

sort_keys and ensure_ascii only apply to the Format as JSON5 and Minify commands. Format as JSON uses the built-in formatter and does not currently support these options.

License

MIT

Results

Packages