What is JSON?
JSON stands for JavaScript Object Notation. It is a lightweight data format used by APIs, configuration files, exports, logs, package files and many other parts of modern software.
A small JSON object might look like this:
{
"name": "JSON Formatter",
"local": true,
"features": ["format", "minify", "copy"]
}
JSON is designed to be easy for programs to read and write. It is also readable for humans, but only when it is formatted clearly. A large minified JSON file can turn into a single long line that is technically valid and emotionally rude.
How this formatter works
This formatter keeps the process intentionally simple:
- It reads the text you paste or open from a local file.
- It parses the whole input as one JSON value.
- It formats valid JSON with indentation.
- It can also minify valid JSON into a compact single-line version.
- It shows the parser error when the input is not valid JSON.
Unlike the NDJSON Formatter, this tool expects one complete JSON value. That value can be an object, array, string, number, boolean or null.
JSON vs NDJSON
JSON and NDJSON look similar, but they are not the same format.
A normal JSON file is one complete value:
[
{ "level": "info", "message": "Started" },
{ "level": "warn", "message": "Slow response" }
]
NDJSON stores one JSON value per line:
{"level":"info","message":"Started"}
{"level":"warn","message":"Slow response"}
If your file has one JSON object per line, use the NDJSON Formatter instead. If your file is one complete JSON object or array, this JSON Formatter is the better fit.
Privacy and local files
This page runs in your browser. There is no account, no backend upload, and no server-side storage.
If you open a local file, your browser reads the file so this page can format it. The file is not uploaded to hluska.ca.
If you refresh or close the page, the current input is gone. That is intentional.
Want to test that?
After this page loads, turn off your internet connection and try using the formatter. If it still works, that tells you the formatting is happening in your browser.
You can also open your browser developer tools, check the Network tab, and then format a file. You should not see the file being uploaded anywhere.
That does not mean every browser tool is safe. It just gives you a practical way to check what this page is doing.
Before sharing formatted JSON
Formatting makes JSON easier to read. It does not make configuration files, API responses, exports or logs safe to share.
Before sending formatted JSON to another person or company, check for values such as:
- tokens
- secrets
- passwords
- API keys
- email addresses
- usernames
- file paths
- machine names
- internal URLs
- customer data
- session IDs
- config values
Unless you have strong protections in place, including legal and data sharing documents where needed, you will usually be better off copying only the exact part you need. If you work with sensitive files often, it is worth learning how to sanitize data before sharing it.