Format and validate JSON.

Paste minified or messy JSON and get clean, indented, validated output back instantly.

  • Liveformats as you type
  • Exactlong numbers kept digit for digit
  • 1 clickto a link, no account

Loading the tool…

How it works

From messy JSON to a clean, shareable file.

  1. Paste it, open it or drop it in

    Paste JSON, open a .json or .txt file, or drag one onto the input. Sample loads an example to try.

  2. Read the result as you type

    The formatted version appears as you type. If something is wrong, you get the line and column of the first problem.

  3. Get a link

    Press Get a link and the JSON goes live at a nudgehost.com address, where it opens as a tree. Without an account, the link lasts 7 days.

In the formatter

What the formatter does.

  • Formats as you type

    Paste messy or minified JSON and the clean version appears as you type.

  • Syntax highlighting

    Keys, strings, numbers and booleans in their own colours, with line numbers.

  • Line and column on errors

    A trailing comma or a missing quote is pinned to its line and column, and marked in the gutter.

  • Indent your way

    2 spaces, 4 spaces or tabs, remembered for next time.

  • Sort keys

    Put every object’s keys in order, at every level. Arrays keep theirs.

  • Tree view

    Fold and unfold the structure instead of scrolling it.

  • Long numbers kept exact

    A 20-digit ID comes back digit for digit.

  • Minify

    Strip the whitespace for a compact copy.

  • Open or drop a file

    Open a .json or .txt file up to 10MB, or drag one onto the input.

  • Copy, download, clear

    Copy the result, save it as a .json file, or start again.

  • Counts

    Characters, lines and bytes on both sides.

  • Get a link

    Publish the JSON to a link that opens as a tree.

Sharing it

The JSON you formatted, live at its own link.

Press Get a link and the JSON goes online. Paste the address into a chat or a ticket and it opens as a tree anyone can fold, with Copy raw JSON and Download above it. Links made without an account last 7 days.

  • A preview card with the file name
  • Opens as a collapsible tree
  • No account for you or for them

Compared

NudgeHost and Static.app, for formatting JSON.

Both are free and format JSON in the browser. The rows below compare the two tools feature by feature.

NudgeHostStatic.app
Formats as you typeYesNo, it needs a click
Syntax highlightingYesNo, plain text boxes
Line and column on errorsYesYes
Indent 2, 4 or tabsYesYes
Sort keysYesYes
Tree viewYesYes
Long numbers kept exactYesYes
Open or drag in a .json fileYesYes
Dark editorYesNo
A link to the formatted JSONOne click, no accountNot from the tool. Its upload box does not take a .json file

Static.app checked on static.app/json-beautifier on 27 September 2026.

Formatting JSON

Why format JSON here.

Minified JSON from an API or a log is hard to read and harder to discuss. The formatter lays it out as you type, and a stray comma or quote shows up with its line and column instead of a vague failure.

Numbers come back exactly as you wrote them, so a long order or account ID keeps every digit where JSON.parse would round it. When the payload has to reach a teammate, sharing the JSON file as a link beats pasting a wall of text into a chat. Chat apps that show link previews draw it as a preview card with the file name.

Formatting never needs an account, and neither does sharing. Signed in, links stay live with no end date, and the three plans set how many, 10 on Free and no cap on Pro or Studio.

Frequently asked questions

  • Is the JSON formatter free?

    Yes. Formatting, the tree, Copy and Download need no account and cost nothing. Publishing with Get a link is free as well, with or without an account.

  • Does my JSON get sent to a server?

    Not while you format. Parsing, formatting, the tree and the file picker all run in this page. Your JSON goes to NudgeHost only when you press Get a link to publish it.

  • Will it tell me what's wrong with invalid JSON?

    Yes. The output pane names the first problem with its line and column, such as "Line 4, column 6: Trailing comma before ]", and the input marks the same spot in its gutter. Fix that one and the next problem, if there is one, shows up in its place.

  • Does it accept comments or trailing commas?

    No. The formatter follows the JSON standard strictly, so comments, trailing commas, single quotes, unquoted keys, NaN and Infinity are all reported as errors with their line and column. JSON.parse and other strict readers reject them too, so a file that passes here will load elsewhere.

  • Why does it say Unterminated string?

    A string opened with a double quote never closes before the end of its line or the end of the input. JSON strings cannot run onto a new line, so a line break inside one has to be written as \n.

  • Can I format a value that is not an object or an array?

    Yes. A single string, number, true, false or null is valid JSON on its own, and the formatter prints it as it is. Most JSON starts with { or [, and that is where the indenting makes a difference.

  • What if my file starts with a byte order mark?

    It is skipped. Some editors put an invisible byte order mark at the start of a file, and it is not part of the JSON. Anything else before the first value is reported as an error, with its line and column.

  • Does it keep long numbers exact?

    Yes. Each number is printed from the text you gave it, so 12345678901234567890 stays 12345678901234567890 and 1.50e+10 stays 1.50e+10. A tool that reads JSON with JavaScript's JSON.parse turns any integer past 2^53 into the nearest double, which changes its last digits.

  • Does the formatter change my strings?

    No. Strings are printed exactly as written, escapes included, so \u00e9 stays \u00e9 rather than turning into é. Only the whitespace between values changes, and the key order when Sort keys is on.

  • Can it minify as well as format?

    Yes. Tick Minify and the output drops to one line with no spaces between values. The numbers and strings stay exactly as written, and Sort keys still works.

  • Can I choose the indent?

    Yes. Pick 2 spaces, 4 spaces or tabs from the menu above the output. The formatter remembers your choice in this browser.

  • Do Sort keys and Minify change what the JSON means?

    No. Sort keys moves keys only within their own object, and Minify only removes the whitespace between values. Every key, value, number and string is still there, written exactly as before, and the JSON standard treats the order of an object's keys as carrying no meaning.

  • What does Sort keys do?

    It puts the keys of every object in order, at every level of nesting, comparing them character by character, so capital letters come before lower-case ones. Arrays keep their order, since the position of an item is part of what it means.

  • What happens to duplicate keys?

    They are kept, in the order they appear. The JSON standard allows a key to repeat, and the formatter does not pick one over the other. With Sort keys on, repeated keys stay next to each other in their original order.

  • What is the Tree tab?

    The Tree tab shows the same result as a tree you can fold and unfold. The top two levels start open, and a large array opens 200 items at a time, with a button for the next batch.

  • Can I open a JSON file?

    Yes. Use Open file, or drag a .json or .txt file onto the input. The formatter opens files up to 10MB, the same limit as the JSON viewer, and Download saves the result under the same name with .json on the end.

  • How large a document can it handle?

    Files up to 10MB open, and pasted text has no set limit. Input over 200,000 characters is formatted after a short pause in typing, away from the page's main thread, so the page keeps responding while a large document is laid out.

  • Which keyboard shortcuts work in the editor?

    Undo and redo work as they do in any text box, Tab indents the selected lines and Shift+Tab takes the indent away. The small arrows beside the line numbers fold an object or an array out of sight, in the input and in the output.

  • Can I copy part of the output?

    Yes. The output pane cannot be typed in, but you can select any part of it and copy that. The Copy button above the editors takes the whole output.

  • Can I use a dark editor?

    Yes. The moon button switches both editors to a dark theme, and this browser remembers the choice. It is the same setting the HTML tester uses.

  • Does the formatter save my JSON?

    No. The JSON lives in this page until you leave it, and reloading brings back the sample. Use Download to keep a copy as a .json file, or Get a link to put it online. The formatter remembers only your indent and whether you chose the dark editor.

  • How do I share formatted JSON?

    Press Get a link. The formatted JSON is published as a .json file at a nudgehost.com address, and the Copy link button puts the address on your clipboard, ready to paste into a chat, a ticket or an email.

  • Can I publish or download JSON that does not parse?

    No. Get a link, Copy and Download stay switched off until the input parses, so whatever you save or share is valid JSON, laid out the way the output pane shows it.

  • What name does a published file get?

    The name of the file you opened, with .json on the end, or data.json when you pasted the JSON. That name shows above the tree on the link and on its preview card.

  • What does a shared JSON link show?

    The JSON opens as a collapsible tree, with buttons to copy the raw text or download the file. Chat apps that show link previews draw a NudgeHost card with the file name. A file over 10MB opens as a download instead of a tree.

  • How long does a shared link last?

    7 days without an account. On a free account it stays up until you delete it, and signing up in the same browser moves the links you made without an account across.

  • How many links can I make without an account?

    3 live at a time. When one expires, its slot frees up. A free account holds 10, and Pro and Studio have no limit on live links.

  • How is the formatter different from the JSON viewer?

    The JSON viewer opens a file and shows it as a tree to read. The formatter is for working on JSON. It re-indents it, checks it, sorts or minifies it, and can publish the result. Both read files in your browser.

Get file-sharing tips that actually help.

One email a month. No spam, no fluff.

Ready to try the dev tools?

Free forever, no credit card needed. The whole thing takes a few seconds.

Get started free