How to Format JSON in Jira (Comments, Descriptions & Fields)
Every bug report eventually contains the same artifact: a REST response pasted into a Jira comment as one 4,000-character line. Nobody can read it, Jira can't help — the editor has no JSON tooling at all — and the payload gets re-pasted, re-formatted in a browser tool, and re-pasted again until someone gives up. Here are the three workable ways to handle JSON in Jira, from native-and-free to an in-issue panel, and where each one fits.
Quick answer: For a comment, use Jira's code snippet block with JSON as the language — monospace, indentation preserved. To format, run it through jq or your editor and paste the result back. To format, validate and explore JSON without leaving the issue, JSON Graph Viewer & Visualizer for Jira adds a Paste JSON tab that highlights and validates as you type, plus a node graph of the payload's shape.
Method 1 — the Native Code Block (the Floor)
Every method starts here. In the comment or description editor, insert a code snippet (the {} icon or typing /code), paste the payload, and pick JSON as the language.
What you get: monospace text that keeps its line structure and copies cleanly back out — which is the entire difference between readable and unreadable JSON.
What you don't get: a pretty-print button (a minified one-liner stays a minified one-liner), syntax validation (a stray comma ships silently), or any way to collapse the 200 lines you don't care about. The code block is storage, not tooling.
Method 2 — Format Outside, Paste Back (Free, Works Everywhere)
When the payload arrives minified, format it before it enters Jira:
# jq — one line, any payload you can curl
curl -s https://api.example.com/orders/42 | jq .
# or format what's already on your clipboard
pbpaste | jq .
Any editor does the same (VS Code: format document with JSON language mode). Paste the formatted result into the Method 1 code block.
The round-trip is the cost: for a one-off share it's ten seconds, and it keeps Jira clean of extra apps. As a daily workflow — debug a webhook, share a payload, review an integration — it breaks down, because the formatted copy in the comment is stale the moment the API response changes.
Method 3 — an In-Issue Panel That Formats, Validates and Graphs
JSON Graph Viewer & Visualizer for Jira puts the tooling where the JSON actually lives — the issue. It's read-only (nothing it sees can be changed, and rendering happens in your browser), and there's nothing to configure.
Paste JSON is the tab for the comment-and-webhook workflow: a syntax-highlighted editor that renders as you type. Paste a dev-tools response, a webhook payload or an API example; invalid input gets told to you plainly — "That isn't valid JSON. Check the syntax and try again." — instead of a blank panel. Valid JSON becomes an interactive node graph: expand and collapse objects, fold a 200-element array into a single n items node, pan and zoom to see the shape you'd otherwise count braces for.
The panel also finds JSON that's already on the issue, which is the part pasting can't do:
- Issue fields — any field whose content parses as JSON (a REST payload stored in a custom field) renders automatically; several matches get a picker.
- Issue properties — JSON that other apps stash on the issue as entity properties (integration state, cached API data) shows up under its own tab.
A view-mode dropdown switches between Code (formatted and highlighted), Graph, or both side by side — read the payload above, see its shape below.
Where JSON Hides in Jira
| Source | How it got there | Readable by |
|---|---|---|
| Comment / description paste | Someone sharing a payload | Code block + manual formatting |
| Custom field | An integration or script storing an API response | Panel's Issue fields tab, automatically |
| Issue (entity) property | Another app writing structured state | Panel's Issue properties tab, automatically |
| Webhook / REST debugging | You, from dev tools or a curl repro | Paste JSON tab, live |
The last three are the reason "format outside and paste back" stops scaling: the JSON isn't text someone pasted once — it's state that changes, and a stale formatted copy in a comment is worse than none.
Which Method Should You Use?
| Need | Use |
|---|---|
| Share a payload once in a comment | Code block (format first if it's minified) |
| Occasional formatting, zero apps | jq / editor → paste back |
| Debug webhooks and integrations in the issue, validate as you type | JSON Graph Viewer & Visualizer panel |
| JSON stored in fields or properties, not comments | Panel — it finds those sources on its own |
Related Resources
- How to View JSON in Jira — the three JSON sources in depth
- JSON Graph Viewer & Visualizer for Jira — full documentation: sources, view modes, themes
Try JSON Structure Viewer for Confluence
Visualize JSON as interactive structure diagrams — free for up to 10 users.
Get it on the Atlassian Marketplace