# Code tidy

> Code tidy reformats messy or minified HTML, CSS, JavaScript and JSON so it is easy to read, or squashes it down for smaller files. Free, no sign-in.

Page: https://ishowpdf.com/tools/code-tidy

## What Code tidy does

Code tidy reformats messy or minified HTML, CSS, JavaScript and JSON so it is easy to read, or squashes it down for smaller files. It saves time when you inherit unreadable code or copy a one-line JSON from a log.

Leave the language on Detect or choose it yourself. Pick Tidy to indent the code with 2 spaces, 4 spaces or tabs, or Minified to strip out blank space. Minifying HTML and CSS also removes comments. For JavaScript, minifying only removes comments, indents and blank lines; it does not rename variables. Invalid JSON gets an error with the reason.

## How to use Code tidy

1. **Paste the code**: Drop in HTML, CSS, JavaScript or JSON.
2. **Pick the language**: Keep Detect, or set the language yourself if the guess is wrong.
3. **Choose Tidy or Minified**: Set the indent size when tidying.
4. **Press Tidy**: Copy or download the result.

## Questions

**How do I format JSON so it is readable?**

Paste it, choose Tidy and an indent size, and press Tidy. Any error in the JSON is reported with the reason.

**Does minifying change how my code works?**

Only blank space and comments are removed. Take care with HTML inside pre tags, where spacing matters to how the text looks.

**Can it detect the language automatically?**

Yes, from how the code starts and looks. If it guesses wrong, pick the language from the list.

More free tools: https://ishowpdf.com/tools
