How to format JSON without uploading it
You can format JSON without uploading it by using a formatter that does the work on your own computer. Paste the JSON into Olbo's JSON tool, or open the file, and press Pretty: each level is indented by two spaces, and the JSON is never sent to a server, so a token or a customer's address inside it stays on your computer.
Step by step
- Open the JSON tool and press "or paste some JSON".Paste into the box that opens. To format a file instead, press Open a JSON file, or drag the file onto the window.
- Press Pretty.Each level is indented by two spaces. If Pretty is greyed out, the JSON has a mistake in it, and the message under the text says where. On a phone, Pretty is behind the three-dot button.
- Copy the result, or press Save JSON.In the Text view you can select it all and copy it. Save JSON writes a new file named like data.edited.json and leaves the file you opened as it was. On a phone the button says Save.
Why pasting JSON into a website can be risky
An API response or a config file often holds more than the data you came to look at: an API key, a login token, a database password, or the names and emails of real people. Paste it into a website that sends it to a server, and you cannot see where it goes after that or how long it is kept. If an API key has gone out that way, treat it as leaked and replace it.
Olbo's JSON tool does the work in the page, on your computer, and sends nothing you paste or open anywhere. To check, open your browser's network panel while you work: none of the requests carries your JSON. Olbo does keep a copy of your work in this browser, so it can offer it back if the tab closes. Press Close when you are done (on a phone it is behind the three-dot button) and Olbo deletes that copy. A file it saved for you, such as data.edited.json, stays.
What pretty printing changes, and what it does not
Pretty puts each key and each list item on its own line. Minify does the opposite and takes out every space between values. Sort keys sorts the keys in every object, at every level, and leaves every list in the order it was in.
The values stay the same. Two things in a file would change them, and the status bar flags both as soon as the JSON is read, with words such as "1 repeated key" or "2 numbers rounded". If a key appears twice in one object, a browser keeps only the last one, and numbers too long for a browser to hold exactly, such as 19-digit IDs, would come out rounded. Olbo will not reformat a file with either, and says what would be lost. After a reformat, Undo puts back what was there.
Big files, and working without a connection
For a big file the Text view is greyed out, and you read the JSON in the tree, which only draws the parts you open. Pretty, Minify and Save JSON still work. On the Free plan Olbo opens and saves files up to 2 MB, and a pretty printed file is bigger than the same data minified, so it can go over that when you save.
The desktop app for Mac, Windows and Linux does all of this with no internet connection.
More guides
Olbo is an office suite that runs in your browser. Your files are read on the machine you are sitting at and are never uploaded. See all the tools.