JustRandom

JSON Minifier

Minify valid JSON locally without changing whitespace inside strings.

Minify JSON

Remove formatting whitespace by parsing and serializing one valid JSON value.

Up to 1,000,000 characters. Your JSON stays in this browser.

Minified result

Minified JSON will appear here after you submit the form.

How to minify JSON

  1. Paste one valid JSON value into JSON input.
  2. Select Minify JSON to parse and compact the value.
  3. Review the one-line result, then copy it when needed.

Minification example

A formatted object such as:

{
  "name": "Ada",
  "active": true
}

Becomes {"name":"Ada","active":true}.

Exact behavior and limits

This tool uses JSON parsing followed by compact JSON serialization. It does not remove whitespace with regular expressions, so spaces, newlines, escaped quotes, Unicode, and emoji inside strings retain their JSON meaning.

Each input is limited to 1,000,000 JavaScript string characters. Browser JSON parsing represents numbers as JavaScript numbers, so integers outside the safe-integer range may lose precision.

Browser-local privacy

Your input and results are processed in this browser and are not uploaded by this tool. Nothing is saved to cookies, local storage, a history, or the page URL.

Frequently asked questions

Does minifying JSON change string values?

No. Whitespace and escape meaning inside strings are preserved by JSON parsing and serialization.

Can I minify an array or primitive JSON value?

Yes. Objects, arrays, strings, numbers, booleans, and null are all valid root values.

Is my JSON uploaded?

No. Your input and result are processed in this browser and are not uploaded by this tool.

Related tools

Explore another available JustRandom tool that may help with a related task.