Fractured JSON Formatter
Smart JSON formatter that creates human-readable output with table-like alignment, compact arrays, and comment support
Input
Output
Readme
What is FracturedJson?
FracturedJson is an intelligent JSON formatting approach that produces human-readable output while keeping the data reasonably compact. Unlike traditional formatters that either fully expand all nested structures or compress everything onto single lines, FracturedJson finds a smart balance—similar arrays and objects are aligned like tables, long arrays span multiple lines with multiple items per row, and short simple structures stay on single lines.
This formatting style makes JSON configuration files, API responses, and data structures significantly easier to read and maintain. When data has regular patterns—like arrays of coordinates or objects with similar properties—FracturedJson aligns them so you can scan the data like a spreadsheet rather than hunting through deeply nested brackets.
Tool description
This Fractured JSON Formatter tool transforms JSON data into beautifully formatted output using the FracturedJson algorithm. It supports JSON with comments (JSONC), offers extensive formatting options, and produces output that's both human-readable and reasonably compact.
The formatter intelligently decides when to put data on single lines versus multiple lines based on complexity and length settings. Similar structures get aligned in table-like columns, making patterns in your data immediately visible.
Features
- Table-like alignment: Similar objects and arrays are formatted with aligned columns, making patterns visible at a glance
- Compact arrays: Long arrays of simple values are written with multiple items per line, saving vertical space while remaining readable
- Comment support: Preserves, removes, or validates comments in JSONC files depending on your preference
- Number alignment: Aligns decimal points in number columns for easy comparison of values
- Configurable complexity: Control exactly how deeply nested structures can be before they're expanded to multiple lines
Use cases
- Formatting JSON configuration files to make them easier to review and edit
- Prettifying API responses that contain arrays of similar objects (like database records)
- Preparing JSON data for documentation where alignment improves readability
- Converting compact JSON exports from tools into human-friendly formats
- Working with game configuration files that contain coordinate arrays or item lists
Formatting options
| Option | Description |
|---|---|
| Max Line Length | Maximum total line length including indentation (40-300 characters) |
| Max Inline Complexity | How deeply nested a structure can be while staying on one line (0-10) |
| Max Compact Array Complexity | Nesting depth for arrays formatted with multiple items per row (0-10) |
| Max Table Row Complexity | Nesting depth for table-formatted rows with aligned columns (0-10) |
| Min Compact Array Row Items | Minimum items needed to format an array compactly (1-20) |
| Indent Spaces | Number of spaces per indentation level (1-8) |
| Comment Policy | Remove, preserve, or treat comments as errors |
| Number Alignment | Left, right, decimal-aligned, or normalized numbers |
| Line Endings | LF (Unix/Mac) or CRLF (Windows) line breaks |
Checkbox options
- Use Tabs: Use tab characters instead of spaces for indentation
- Colon Padding: Add a space after colons in objects
- Comma Padding: Add a space after commas
- Nested Bracket Padding: Add spaces inside brackets containing other arrays/objects
- Simple Bracket Padding: Add spaces inside brackets containing only simple values
- Preserve Blank Lines: Keep blank lines from the original input
- Allow Trailing Commas: Permit a comma after the last element (non-standard JSON)