About the JSON Minifier
Indentation makes JSON readable for people but adds bytes that machines do not need. Minifying removes every space and line break outside string values, which reduces payload size for APIs, local storage, URLs and embedded configuration.
The input is parsed first, so the minifier also validates your JSON and reports errors clearly. Text inside strings, including spaces, is never changed.
How to use it
- Paste formatted JSON.
- Click Minify JSON.
- Copy the compact result.
Example
{
"id": 42,
"title": "Hello world",
"tags": [
"a",
"b"
]
}
{"id":42,"title":"Hello world","tags":["a","b"]}
When to use it
- Reducing API request and response sizes.
- Storing JSON in environment variables or a single database field.
- Embedding JSON in HTML or JavaScript.
- Comparing JSON documents on one line.
Frequently asked questions
How much smaller will my JSON be?
It depends on the indentation. Heavily indented files often shrink by 20–40%.
Are spaces inside strings removed?
No. Only whitespace between tokens is removed.
How do I make it readable again?
Use the JSON Formatter.
Is the text I enter kept private?
Yes. The JSON Minifier runs entirely in your web browser, so your text is never uploaded to or stored on our servers. Like most free websites, TextForge shows ads from Google, which may use cookies. See our Privacy Policy for details.