jsonecho

JavaScript Pretty Print

Pretty print JavaScript so you can read it.

Loading the tool...

How to use JavaScript Pretty Print

  1. Paste the script.
  2. Pick the indent.
  3. Copy the result.

About JavaScript Pretty Print

Pretty printing a script means adding line breaks after statements, indenting blocks and putting spaces where they belong. It is the quickest way to make an unreadable one-liner understandable.

The tool does not execute your code. It reads the text, and only rewrites whitespace.

Frequently asked questions

Is my code sent to a server?

No. Formatting happens in your browser.

Will it run my script?

Never. The text is only read and reformatted.

Does it work for JSON too?

It does, but the JSON Formatter is a better choice, since it also validates.

More in Code Formatters

All tools →