Skip to formatter
Veomark

Free · Instant · No signup

JSON Formatter and Minifier

2-space, 4-space, tab, or compact JSON with auto-fix and line/column errors.

QuotVid daily quote videos across TikTok, Instagram, YouTube, Pinterest, and Facebook

JSON Formatter and Minifier

Formatter

Paste JSON. Formatting runs in this browser. Character count updates live.

0 characters

Calculated Results

Before

0.00 KB

After

0.00 KB

Chars reduced

0

Savings

0.0%

 
QuotVid free Pinterest automation trial - auto-post videos every day

Pretty-print and minify without a hosted beautifier

API logs, Webhook payloads, and fixture files show up as one line or as JavaScript object literals with trailing commas. A formatter that POSTs the body is the wrong tool when the JSON includes tokens. This page runs JSON.parse and JSON.stringify in the tab. Four indent actions: 2-space (default), 4-space, tab, and compact minify (JSON.stringify(value) with no indent). Output has a line-number gutter and a live character count on the input.

Telemetry compares UTF-8 bytes before and after, character reduction, and savings percent. Pretty-print often grows the file. Minify usually shrinks it. Both results are honest. Copy output and Download .json file stay disabled until parse succeeds so you cannot export a blank document by mistake.

JSON.parse(source)
JSON.stringify(value, null, indent)
error: line L, column C

Parse errors extract line and column from the engine message (or from a character position). The snippet under the alert reprints the failing line with a caret. That is enough to find a missing comma without a second tool. Empty textarea: empty output, KPIs at zero, no alert.

Auto-fix is a preprocessor, not a linter

The auto-fix toggle is for humans pasting from Slack, Word, and JS object literals. It drops a BOM, maps smart quotes to ASCII, converts simple single-quoted strings to JSON strings, quotes unquoted keys after or ,, and strips trailing commas before } or ]. Walkers skip string interiors so "a, b" is not damaged. Load sample data is intentionally invalid JSON until auto-fix is on.

Turn auto-fix off when you are auditing a payload that must fail on any RFC 8259 deviation. Comments (//, /* */), undefined, and trailing function calls are not repaired. If parse still fails after auto-fix, read the caret and edit the source. For YAML output rather than JSON, use the JSON to YAML Converter.

Download writes formatted.json with UTF-8 text. Copy uses the Clipboard API and a 1px textarea fallback. Status text for minify is polite ("JSON minified"), not an alert. Hard failures stay on the assertive alert region.

When to minify vs indent

Use 2-space or 4-space for reviews and git diffs. Use tab indent if that is the project .editorconfig. Use compact minify for request bodies where bytes matter and humans will not read the wire format. Savings of 40% on a 2 KB fixture is small. The same ratio on a 2 MB export is the reason the KB cards exist.

This is not JSON Schema, not a canonical JSON (RFC 8785) serializer, and not a streaming parser for 100 MB files. Paste a slice. For CSS rather than JSON, use the CSS Minifier and Optimizer. For regex against the pretty output, use the Regex Tester.

Frequently Asked Questions (FAQ)

How are JSON syntax errors reported?

JSON.parse failures go to a live alert with line and column when the engine reports a position. A snippet under the alert shows the failing line and a caret at the column. Copy and Download stay disabled until parse succeeds. Empty input is not an error.

What does auto-fix common errors change?

When the toggle is on, the tool strips a UTF-8 BOM, converts smart quotes, turns simple single-quoted strings into JSON strings, quotes unquoted object keys, and removes trailing commas before } or ]. String contents are skipped so a comma inside a value is left alone.

How is compression savings calculated?

Before and after sizes are UTF-8 byte lengths from TextEncoder, shown in KB (bytes / 1024). Character reduction is input.length minus output.length. Savings % = (before bytes - after bytes) / before bytes x 100. Pretty-print can be larger than the source. Minify is usually smaller.

Does formatting upload my payload?

No. Parse, auto-fix, stringify, copy, and the .json download all run in the tab. Use that for API bodies, secrets in fixtures, and anything you would not paste into a hosted beautifier. Download writes formatted.json as UTF-8.