ToolLane.online

JSON to Single Line

Quick answer: Turns pretty-printed JSON into one compact line, removing spaces and line breaks, and shows how many characters you saved.

Single-line JSON, also called minified JSON, is the same data written on one line with no spaces or line breaks. It works exactly like pretty JSON, but it is smaller, so it is handy for pasting into a form, a URL, or a config field that expects one line. This tool reads your formatted JSON, checks that it is valid, and writes it out as one compact line, telling you how many characters you saved.

Limit: Max 1,000,000 characters.

How to use JSON to Single Line

  1. Paste your pretty-printed JSON into the box.
  2. Click Minify to One Line.
  3. Read the single-line JSON and how many characters you saved.
  4. Copy the result or download it with the download link.

Frequently asked questions

Is JSON to Single Line free?

Yes, it is free and needs no sign-up.

What is single-line JSON?

It is the same JSON written on one line, with all unnecessary spaces and line breaks removed.

What happens if my JSON is invalid?

You get the exact error message, and no single-line output or download is made.

Is my JSON uploaded anywhere?

No. The JSON is minified in your browser and never leaves your device.

← All tools