Developer Tools

JSON Minifier

Paste formatted or pretty-printed JSON and remove all whitespace, newlines, and indentation. Get compact single-line JSON ready for HTTP payloads, environment variables, or minified config files.

Removes all whitespace Browser-only One-click copy
json JSON (formatted)
Runs in your browser; code never leaves your device

Features

  • Removes all whitespace and newlines from valid JSON
  • Validates JSON syntax before minifying
  • Shows original and minified byte counts with savings
  • Copy minified JSON with one click
  • Download as .json file
  • Browser-only. No upload

How to use it

  1. Paste your formatted JSON into the input panel.
  2. Minified JSON appears instantly in the output.
  3. Check the size reduction shown below.
  4. Copy or download the compact result.

Use cases

  • Minifying JSON for API request payloads
  • Compacting JSON for localStorage or cookie storage
  • Reducing JSON config file sizes
  • Preparing compact JSON for environment variables

Limitations

  • JSON comments are not valid JSON and will cause a parse error.
  • Key order is preserved but whitespace inside string values is not modified.
Questions & answers

Frequently asked

Does it check if JSON is valid?

Yes. Invalid JSON produces a parse error message. The minifier only processes syntactically valid JSON.