Files are read locally by your browser. Nothing is uploaded, stored, or sent to a backend.

Paste JSON, or open a local .json, .txt, or .log file.

No file selected. Paste JSON above or open a local file.

- Formatted Results -

Valid JSON will be formatted or minified here. Invalid JSON will show the parser error so you know where to start looking.

Waiting for JSON.
JSON type
0 top-level keys/items
0 characters

Nothing formatted yet

Paste JSON above, open a local file, and choose Format JSON. The formatted output will appear here.

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:

  1. It reads the text you paste or open from a local file.
  2. It parses the whole input as one JSON value.
  3. It formats valid JSON with indentation.
  4. It can also minify valid JSON into a compact single-line version.
  5. 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.

Other Tools

About Tools

Greg built every tool on hluska.ca to run locally in the browser with no backend. This means your data is never sent anywhere - it stays on your device. These tools are designed for practical use, primarily for Greg's personal use and so they reflect his tastes and needs. They're not polished products, some are rough around the edges and others will prove to be horrible mistakes. But web development wouldn't be so fun and glamourous if you didn't occasionally embarrass yourself in public.