RevealTheme logo

Minificador de JavaScript

Minificación básica de JavaScript: elimina comentarios y espacios en blanco innecesarios. Usa un minificador real (Terser, esbuild) para producción.

Cómo usar esta herramienta

  1. 1

    Paste or type your JavaScript into the input textarea.

  2. 2

    The minified output appears instantly in the panel below as you type — there is no button to press.

  3. 3

    Check the size readout (original length, an arrow, and minified length) to see how much was removed.

  4. 4

    Select the text in the output box and copy it manually into your file.

¿Qué es el Minificador de JavaScript?

La minificación de JavaScript reduce el tamaño del paquete y el tiempo de análisis. Esta herramienta realiza una eliminación básica de espacios en blanco y comentarios. Para paquetes de producción, usa Terser, esbuild o SWC: realizan ofuscación de nombres y eliminación de código muerto que produce una salida drásticamente menor (a menudo entre un 60 % y un 80 % de reducción).

Casos de uso comunes

  • Quickly shrinking a short, comment-heavy snippet before pasting it into a tight inline <script> tag.

  • Stripping comments out of a code sample to share a compact version in a chat or gist.

  • Estimating roughly how much comment and whitespace overhead a small file carries before setting up a real build.

  • Cleaning up a hand-written configuration object or constant block that has no strings containing slashes.

  • Demonstrating to students or teammates what basic comment and whitespace removal looks like versus a real compiler.

  • Minifying a tiny utility function for a bookmarklet where pulling in a full toolchain is overkill.

Preguntas frecuentes

¿Cómo se compara con Terser?
Terser es mucho más agresivo: ofuscación de nombres, eliminación de código muerto, etc. Esta herramienta solo elimina comentarios y espacios en blanco.
¿Esto romperá mi código?
Solo si tu JS tiene problemas de sintaxis (puntos y comas faltantes en posiciones ambiguas). El JavaScript moderno es seguro.

Herramientas relacionadas