Pretty print mode
Uses JSON.stringify with configurable human spacing for familiar brace layout.
JSON to Text helps you see structured data in two complementary human views. Pretty mode reformats JSON with indentation so braces line up the way engineers expect in code review. Flatten mode walks objects and arrays recursively, emitting dotted key paths with primitive values—useful when you want a quick pseudo-log of nested API payloads without jq installed. Parsing and formatting happen in your browser after you click Convert, which keeps draft payloads off a server while you iterate.
JSON is the lingua franca of web APIs, configuration files, and document databases, yet long single-line responses are hard to read in chat or email. Pretty mode is the fastest way to reintroduce whitespace without arguing about tab width in a thread—just paste, convert, copy. Flatten mode answers a different question: “What leaf values exist and where do they live?” That view supports debugging when a client says a field is null but you are unsure which nested branch they mean.
Neither mode invents schema. If your JSON includes arrays of objects with inconsistent keys, flatten output will simply list whatever appears. If you need CSV or SQL, use the dedicated converters on this site instead. If you need lossless binary formats, JSON is already the wrong starting point.
Security reminder: JSON often contains emails, internal IDs, and tokens. Treat every paste as potentially sensitive unless you know the payload is synthetic. Browser execution reduces exfiltration risk relative to sending data to a random API, but it does not replace corporate data policies or secrets scanning in CI.
Uses JSON.stringify with configurable human spacing for familiar brace layout.
Emits dotted paths for nested objects and bracket indices for arrays.
Avoids thrashing on every keystroke for large pasted blobs.
One-click copy for the output textarea after review.
Typical usage keeps payloads local during formatting.
Works well when paired with JSON Validator on this site.
Pretty JSON preserves the original tree shape visually. That makes it ideal for code review comments, documentation figures, and teaching recursion. Humans spot missing commas faster when braces align.
Flatten mode trades tree shape for a grep-friendly list. It shines when you need to scan for suspicious nulls across unknown keys or when you are preparing a quick bullet list of configuration values for a stand-up. It is not a replacement for jq filters that compute aggregates—just a zero-setup stepping stone.
Both modes assume parseable JSON text. Trailing commas, comments, or single-quoted keys—common in hand-written examples—still fail strict JSON.parse rules. Clean those issues first or use a lenient parser in your editor.
Input
{"user":{"id":1,"active":true}}Output
user.id=1
user.active=truePretty mode would instead show indented JSON.
Even local tools should not become the place where API keys leak into screen recordings.
Browsers have finite memory; trim to the failing subtree when debugging.
Run JSON Validator when upstream might emit almost-JSON dialects.
Tickets should say “flattened view” when attaching flattened text to avoid confusion.
Flatten paths change when keys rename—regenerate attachments after refactors.
JSON.parse rejects them; remove commas before the closing brace or bracket.
Strip HTTP headers or log prefixes until the payload starts with { or [.
JavaScript may round integers beyond 2^53—know the limits when flattening IDs.
JSON.parse keeps the last duplicate silently—flatten reflects that winner only.
Use JSON to CSV when you need spreadsheet columns, not dotted paths.
No. You must redact secrets yourself before pasting.
Two spaces per level, matching common JavaScript defaults.
Yes; indices appear in brackets in the path segments.
Object key order follows insertion order as parsed by JavaScript engines.
Clicking Convert runs locally in the browser; still follow your data policy.
Use XML to JSON first, then this tool, or use JSON to XML for the inverse direction.
Large pastes would lag if we reformatted on every keypress.
For automation, call JSON.stringify or jq in your pipeline instead.
Switch between pretty and flattened views until your JSON story is obvious to every reader on the thread.