Formatted payload
{{ summaryHeadline }}
{{ metrics.lineCount }} lines in editor draft · {{ formatBytes(metrics.sizeBytes) }} input
Root {{ metrics.rootType }} {{ formatCount(metrics.nodeCount) }} nodes Depth {{ metrics.depth }} Duplicates {{ duplicateKeys.length }} {{ compressionDeltaLabel }} {{ metrics.parseMs }} ms parse
JSON Parse Pretty Wire
JSON formatting input
Choose Review for readable output, Transport for compact payloads, or Signature for sorted no-whitespace output.
Choose Strict JSON for production payloads or JSONC comments for human-edited drafts.
{{ boundedIndentSize }} spaces
Use 0 to 8 spaces; changing this switches the profile to Custom.
spaces
Choose preserve, A to Z, or Z to A; Signature forces A to Z.
Paste one JSON document or drop a .json/.txt file; output updates from editor text.
{{ sourceFileStatus || 'Drop JSON or TXT onto the textarea.' }}
Array mode streams root array items; Single mode emits one compact line.
Turn on when the formatted file should end with a newline.
{{ ensure_newline ? 'On' : 'Off' }}
Turn on to emit \u003c, \u003e, and \u0026 for HTML-adjacent payloads.
{{ escape_html_chars ? 'On' : 'Off' }}
Turn on when downstream expects \/ in strings.
{{ escape_slashes ? 'On' : 'Off' }}
Optional preview filter; CSV and DOCX exports keep the full ledger.
Options: Editor Draft, Wire Payload, or Signature Canonical.

        

        

        
Metric Value Detail Copy
{{ row.metric }} {{ row.value }} {{ row.detail }}
Path Pointer Type Detail Preview Copy
{{ row.path }} {{ row.pointer }} {{ row.type }} {{ row.detail }} {{ row.preview }}
No nodes match the current filter.
{{ ndjsonText }}
{{ diffStatusText }}
Section Note Copy
Interoperability checks Duplicate key findings: {{ duplicateKeys.length }}
Interoperability checks Unsafe integer findings: {{ metrics.unsafeIntegerCount }}
Interoperability checks Canonical profile readiness: {{ canonicalReadyLabel }}
Recommended next action {{ note }}

        
Customize
Advanced
:

JSON is a text format for structured data. It represents strings, numbers, booleans, nulls, objects, and arrays in a form that is readable enough for people and predictable enough for software. Formatting matters because the same data can be written as a compact one-line payload, a readable review draft, or a deterministic string for comparison work.

Whitespace is usually insignificant in JSON, but representation details still affect review and handoff quality. Duplicate object member names can make downstream behavior unpredictable. Large numbers can lose exact integer precision in common browser number handling. A payload that looks tidy can still have hidden structural risk if field paths, node counts, and warnings are not checked.

Line-delimited JSON is a related shape used for one-record-per-line ingestion. It is not the same thing as a single JSON document unless each line is read as its own JSON value. That distinction matters when an array should become a stream of records instead of one compact array.

JSON formatting paths One parsed JSON value can be emitted as readable review text, compact transport text, deterministic text, a line stream, and path diagnostics. JSON text {"service":"api", "replicas":3} Parsed value root type nodes warnings Review views Editor Draft Wire Payload Signature Canonical Node Ledger Line Stream

A formatter should make JSON easier to inspect without inventing meaning. A clean parse proves the text is syntactically valid JSON after the selected draft allowances, not that an API schema, signing system, or application rule will accept the data.

How to Use This Tool:

Start with the next handoff you need, then check the warnings before copying any output.

  1. Choose Review workspace for readable output, Transport payload for compact text, Signature canonical for sorted no-whitespace text, or Custom when the advanced settings should be controlled directly.
  2. Choose Strict JSON for production payloads or JSONC comments when a draft includes // or block comments that should be stripped before formatting.
  3. Set Indent spaces and Key order when the visible draft needs a specific review shape or stable comparison order.
  4. Paste one JSON value into JSON payload, drop text onto the editor, use Browse JSON to load a local JSON or text file, use Sample to restore the example, or copy the current input for review.
  5. Open Advanced when you need line stream mode, final newline policy, HTML-character escaping, slash escaping, node ledger filtering, or a specific delta target.
  6. Fix any parse error first. The error message includes a line and column when the parser position can be mapped back to the editor text.
  7. Read the summary headline and warning alert. Duplicate keys, unsafe integers, long numeric literals, large input, and slow formatting each change how much confidence you should place in the output.
  8. Use Editor Draft, Wire Payload, Signature Canonical, Line Stream, Node Ledger, Change Delta, charts, Formatter Audit, or JSON depending on what needs to travel with the result.
  9. When a validation warning remains, fix the producer or source text before using the output for signing, schema validation, or automated ingestion.

Interpreting Results:

The summary headline is a triage signal. JSON Validated and Structured means parsing succeeded without warnings. Valid JSON with Caveats means the output exists, but one or more findings deserve review. Duplicate Key Review Needed is the strongest warning because repeated names can change meaning when another parser chooses which value to keep.

Do not treat Signature Canonical as a full canonicalization certificate. It gives a deterministic local string from the parsed value. Check duplicate-key and unsafe-integer warnings before using it for hash, HMAC, or detached-signature prep, and compare it with any rules imposed by the receiving system.

Important JSON formatter result signals
Signal What it means Verification cue
Duplicates above zero The source has repeated object member names before normal parsing can discard ambiguity. Fix the source producer before signing, validating, or merging the payload.
Numeric precision risks Some numbers may not round-trip exactly through common number handling. Quote identifier-like integers or high-precision decimals if exact digits matter.
Wire size badge The compact payload differs in byte size from the input source. Use Payload Size Chart when size change matters for transport or review.
No Change Delta The normalized source matches the selected output at line level. Still check warnings because a clean text delta is not a schema check.

Technical Details:

JSON syntax allows any serialized JSON value at the root, including a scalar such as a string, number, boolean, or null. Objects are collections of name/value pairs and arrays are ordered sequences. Whitespace around structural characters can change readability without changing the parsed value.

Object member names should be unique for interoperable behavior. When duplicate names are present, different parsers may keep different values or expose the duplicates differently. That is why duplicate detection has to happen from the source text before the ordinary parsed object loses the repeated-name evidence.

Transformation Core

JSON formatter transformation stages
Stage Rule Review point
Parse source The editor text is parsed as one JSON value after optional comment stripping. Comment stripping helps with draft material, but the output remains standard JSON.
Sort keys Object keys can be preserved, sorted A to Z, or sorted Z to A for the working outputs. Sorting helps diffs and deterministic comparison but can move fields away from author order.
Emit outputs Readable draft, compact payload, deterministic sorted text, line stream, delta, charts, and JSON diagnostics are derived from the parsed value and selected settings. Each view answers a different review question; none replaces schema validation.
Build ledger Every parsed node receives a dot-style path, JSON Pointer path, type, detail, and preview. Use this when field location matters more than the visual shape of braces.

Formula Core

Wire size delta

Wire delta % = Input bytes-Wire bytes Input bytes × 100

A positive reduction means the compact payload is smaller than the editor source. The display rounds the percentage for readability.

JSON warnings and thresholds
Finding Rule used Why it matters
Duplicate keys Repeated names in the same object are collected from the source text. Downstream behavior can be unpredictable when names are not unique.
Unsafe integers Parsed whole numbers outside the exact safe integer range are counted. IDs and counters can change value after parse and stringify cycles.
Precision-heavy literals Number tokens with more than 15 significant digits are flagged. High-precision decimals may need to stay as strings.
Large input Input above 5 MB receives a performance warning. Rendering, charts, and diffs may be slow on weaker devices.
Slow formatting Refresh time at or above 120 ms receives a runtime warning. Very large payloads may be easier to review in chunks.

After the page has loaded, parsing, file loading, formatting, diagnostics, charting, and exports happen in the browser tab. The page does not run schema checks, business rules, API authentication, or application-specific signing policies.

Worked Examples:

Clean a commented draft

A ticket contains a JSON-like snippet with // temporary note and a small object. Set Input dialect to JSONC comments so it can parse, use Editor Draft for review, and remove the comments from the source before handing the payload to a strict production parser.

Prepare repeatable comparison text

A payload with "b": 2 before "a": 1 can use Signature canonical. The output sorts keys A to Z and removes whitespace. If Duplicate keys is above zero or Canonical readiness is blocked by unsafe integers, fix those findings before using the text for hash comparison.

Build one-record-per-line output

An array such as [{"id":1},{"id":2}] with NDJSON mode set to array mode produces two lines, one JSON value per array item. If the root is not an array, the line stream falls back to one compact line for the whole value.

Trace a field path

For {"items":[{"sku":"A-1"}]}, the Node Ledger gives a path such as $.items[0].sku and a JSON Pointer such as /items/0/sku. Use the ledger when a teammate needs an exact field reference instead of a screenshot.

FAQ:

Does it fix invalid JSON automatically?

No. It reports a parse error and waits for valid input. Formatting starts only after the current text can be parsed.

Is Signature Canonical the same as RFC 8785 canonical JSON?

No. It is a deterministic ascending-key serialization for local repeatability. RFC 8785 has stricter interoperability rules than this page claims.

When does Line Stream create multiple lines?

Array mode creates one JSON value per line only when the root value is an array. Otherwise the page emits the whole value as one compact line.

Why are large integers warned about?

Whole numbers outside the safe integer range may not stay exact after parsing. Quote identifier-like values when every digit matters.

Does the data leave the browser while formatting?

No. After the page has loaded, formatting and diagnostics run in the browser tab, including local file reads, charts, copy actions, and downloads.

Glossary:

JSON Pointer
A slash-based standard for pointing to a location inside a JSON value.
Duplicate member name
The same object name appearing more than once within a single JSON object.
Safe integer
A whole number that can be represented exactly by common browser number handling.
Line Stream
The result view that emits one compact JSON value per line when array mode applies.
Deterministic serialization
A repeatable text representation that produces the same bytes for the same parsed data and settings.

References: