Formateador de JSON
Da formato con dos espacios, compacta JSON y comprueba su sintaxis.
Beautify or minify JavaScript — comments and whitespace only, never breaks your code.
This tool only strips comments and whitespace — it never renames identifiers or rewrites your code. Newlines are always preserved to stay safe from ASI (automatic semicolon insertion). For maximum compression in production builds, use terser or esbuild.
It skips advanced optimizations like identifier renaming and dead-code elimination, focusing only on removing comments and whitespace — those deeper optimizations can't be done safely without a full parser. Being upfront about that limit is the trust signal.
No. JavaScript's Automatic Semicolon Insertion (ASI) means deleting a newline — right after `return`, for example — can change what the code does. This tool always preserves exactly one newline wherever the source had one or more, so this class of bug can't happen.
No. Renaming identifiers or eliminating dead code safely requires full parsing and scope analysis, and a subtle mistake there can silently break your program. For maximum compression in a production build, use terser or esbuild.
Bang comments starting with /*! are preserved verbatim after minification. Ordinary comments (// and /* ... */) are removed.
No. Minification and beautification run entirely in your browser's JavaScript; nothing is sent to toco.tools's servers or anywhere else.