Minify JSON: Compress It to One Line
Open or paste JSON and press Minify to put it on one line and see the bytes saved; nothing is uploaded.
Processed on your device. Nothing is uploadedHow to check
Paste text instead
Pasted text stays in this tab and is never sent anywhere.
A free JSON minifier: open a .json file, drop it here or paste the text, and the page offers a one-click Minify button. The whole document is written on a single line with no spaces or line breaks outside strings, and the notice tells you how many bytes it saved. Changed your mind? Undo brings back the original, and Format puts indentation back with 2 or 4 spaces or a tab. Everything happens in your browser, so the JSON stays on your device.
Why use JSON minifier
See the saving
After Minify the page shows the size before and after and how many bytes came off.
Private and free
Your JSON is minified by your own browser and never sent to a server. No account, no watermark.
Works offline
Once this page has loaded, it keeps working without an internet connection.
How it works: minify JSON in three steps
Open or paste your JSON
Choose a .json file, drop it on the page, paste the text into the box, or try one of the two samples.
Press Minify
The notice at the top offers Minify. One click puts the document on one line and shows how many bytes were saved; Undo takes it back.
Copy or download
Copy the minified JSON or download it as a .json file to keep it. Format restores the indentation if you need it readable again.
What the JSON minifier handles
- Spaces, tabs and line breaks between values are removed; text inside strings is left exactly as it is.
- The size before and after, and the bytes saved, are shown after each Minify.
- Big integer IDs keep every digit; nothing is rounded on the way.
- Format puts indentation back with 2 spaces, 4 spaces or a tab.
- Undo returns to the document as it was before Minify.
JSON minifier: what it can't do
- Files up to 10 MB.
- The JSON must be valid to be minified; a file with a syntax error shows where the error is first.
- Minifying only removes whitespace; it does not shorten keys or drop values.
Questions about minifying JSON
- Is my file uploaded?
- No. Your JSON is read and minified by your browser, on your device, and is never sent anywhere. Pasted text stays in this tab. You can check it in your browser's network panel.
- Does minifying change my data?
- No. Only the whitespace between keys and values is removed. Keys, values and every digit of long numbers stay the same, and keys keep their order, including keys that are whole numbers such as "2024", so any program reads the minified file as before.
- How much smaller will my file get?
- It depends on how much indentation it had. Deeply nested files indented with spaces shrink the most; the page shows the exact bytes saved after you press Minify.
- Can I turn minified JSON back into readable JSON?
- Yes. Press Format and choose 2 spaces, 4 spaces or a tab, or press Undo to get back the exact layout you opened.
- Is there a size limit?
- Files up to 10 MB. Larger files are refused before they are read, because every step on them would be slow in a browser tab.
- Where is the minified file kept?
- Nowhere on the site: there is no saving, history or share link. Download the result or copy it before you close the tab.
- How do I minify JSON to one line?
- Open or paste the JSON in OpenAnyDoc's JSON minifier and press Minify: every space and line break outside strings is removed, and the bytes saved are shown. Copy the result or download it as a .json file; the JSON stays in your browser.
Why it's private: your files never leave your browser
Most online viewers upload your file to a server, so a copy of it leaves your device. OpenAnyDoc works the other way round: your browser reads the file and draws it on your screen. Nothing is uploaded, there is no account, and the file is gone from memory when you close the tab, so there is nothing for us to store, see or lose.
How we tell you about new features
Announcements are based on the release date shown to everyone, and nothing is stored on your device or sent anywhere.