Skip to main content

How to Format JSON in Jira (Comments, Descriptions & Fields)

· 5 min read

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​

SourceHow it got thereReadable by
Comment / description pasteSomeone sharing a payloadCode block + manual formatting
Custom fieldAn integration or script storing an API responsePanel's Issue fields tab, automatically
Issue (entity) propertyAnother app writing structured statePanel's Issue properties tab, automatically
Webhook / REST debuggingYou, from dev tools or a curl reproPaste 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?​

NeedUse
Share a payload once in a commentCode block (format first if it's minified)
Occasional formatting, zero appsjq / editor → paste back
Debug webhooks and integrations in the issue, validate as you typeJSON Graph Viewer & Visualizer panel
JSON stored in fields or properties, not commentsPanel — it finds those sources on its own

Try JSON Structure Viewer for Confluence

Visualize JSON as interactive structure diagrams — free for up to 10 users.

Get it on the Atlassian Marketplace