JSON ALL-IN-ONE / BROWSER TOOL
JSON to single line, without changing the data
When a config field, command argument, or log fixture needs JSON on one line, keep the values and remove only the layout. This free online JSON-to-single-line tool works in your browser, with no upload of your JSON to our servers.
Use it for json to one line, an inline JSON snippet, or a JSON one liner. If you searched for json unformat or json compact, that is the same single-line output; the pretty-print button brings the layout back when you need to read it.
What stays the same?
The downloaded JSON keeps the same keys, values, string spaces, escapes, and number spellings. Only formatting outside strings changes. That makes a one-line copy practical without quietly rewriting a long integer or exponent.
JSONC line and block comments are removed from the compact download. For NDJSON or JSONL, the opened records are downloaded as one JSON array rather than concatenated into invalid JSON.
Try a real shape
The page opens with an empty editor. You can use your own file, or load a small example before trying the two download styles.
{
"service": "billing",
"retry": { "count": 3, "delayMs": 250 },
"endpoint": "https://api.example.com/v1/invoices"
}Before you download
Is a JSON one liner still valid JSON?
Yes, when the input is valid JSON or supported JSONC. The formatter validates one complete JSON value before offering an artifact. It will not silently turn two adjacent roots into one number.
Can I use JSON inline in a command or config?
Yes, if the receiving command or config field accepts a single JSON value. Check its quoting rules before pasting: your shell or config format may require escaping even though the JSON itself is valid.
Does it keep comments?
No. A compact download removes // line comments and /* ... */ block comments outside strings. A URL such as https://example.org/a or comment-looking text inside a quoted string stays unchanged.
Where is my file processed?
Privacy-first processing happens locally in this browser tab. The tool does not upload your pasted or opened JSON to our servers; the page itself still loads normal site assets and may use site analytics.