How I Created Best Online JSON Formatter

Sourabh Soni
Feb 25 · 3 min read
image generated using carbon.now.sh

In my day job, we work with Java and Go based microservices. All these microservices interact with each other either via REST end points or Kafka updates. Regardless of the medium of interaction, the format of exchanging data is JSON!

What is JSON?

JSON stands for JavaScript Object Notation. Initially a part of Javascript standard, it has now become a norm for transporting data over a network because of its small footprint as compared to its rival XML!

This is how a sample JSON object looks like -

sample JSON object
sample JSON object

What is a formatter?

Because JSON is represented as text everywhere, usually when you try to read it in code or logs, it shows up like this -

This small (minified) JSON may not look very complex to read, but in real world software, a JSON object may even spread across 100s of lines. A formatter is a tool that you can use to format this minified string format into a tree like tabbed JSON (as represented above) so that it is easier to read and understand this data.

What is JSONToolBox?

JTB (JSONToolBox) is an online JSON formatter in simple terms. It lets you paste in minified JSON string in one editor and then as you type in, formats that JSON to a tree like view which we call formatted JSON.

Why is it the best formatter?

Coming back to the original context of this article. Consider our application environment where 20+ microservices are constantly interacting with each other and all the interaction information is logged as JSON strings. When we need to debug a complex flow where data passes between multiple microservices, it becomes a very difficult task as for any other online formatter we need to open multiple tabs in the browser each containing one JSON. Whereas in JTB, you can format/edit multiple JSON strings at the same time in the same page!

Just click on add formatter and one more formatter pane appears which you can collapse as well if not needed.

Okay, cool! What else makes it better?

Just being able to format/minify multiple JSON at the same time does not make it the best online JSON formatter out there. It has various other small nifty tricks up its sleeve which are created based on developer inputs or looking at our debugging/development workflow. Here’s the list of other cool features of JTB

  • Copy minified JSON in a single click
  • Copy any child object in a single click
  • Download formatted JSON as file
  • Change file name of the JSON you are formatting/editing/downloading
  • Search in formatted JSON
  • Drag and drop a JSON file to format/minify
  • Import multiple files at the same time.
  • No advertisements!

Oh and did I mention it is a PWA!!!

So, it is also the best offline JSON formatter out there :D

Although there is a plethora of online JSON formatters out there, I want to make JSONToolBox to be the most developer friendly tool out there. So, if you have any suggestions/feedback that you think can improve your productivity while using JTB then do mention here or DM me on twitter. Would love to hear what people think of it.

Happy coding!

The Startup

Get smarter at building your thing. Join The Startup’s +725K followers.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store