Code tools
JavaScript Formatter
Format or minify JavaScript locally without running it or renaming variables.
Runs locallyRuns locally in your browser
Guide
Format JavaScript for reading or minify it for compact output. Choose Script or Module to match the source. You can inspect the result without running the code.
- Add your document
Paste into Input, choose an example or use Open file. You can also drop one local text file into Input.
- Choose and run
Choosing an example shows the result immediately. When you type or change an option, Output updates after a short pause. Format runs immediately. Where available, Minify keeps the result compact as you continue typing.
- Read and keep the result
Read Output. On a phone, select the Output tab. Use Copy output or Download to keep the result. Clear removes both fields.
On mobile, choose Output to read the result. Clear removes both fields.
Source mode
- Script: ordinary JavaScript without module import or export declarations.
- Module: JavaScript with import or export declarations. No modules are fetched or executed.
Indent
- 2 spaces: use two spaces for each indentation level.
- 4 spaces: use four spaces for each indentation level.
- Tab: use a tab character for each indentation level.
Shortcuts
- Ctrl / Cmd + Enter — Run selected action
- Ctrl / Cmd + Shift + C — Copy output
- Ctrl / Cmd + S — Download output
- ? — Show shortcuts outside text fields
Shortcuts work while focus is in the workspace. Copy and download need valid output.
Common questions
- Does this run my code?
- No. Code is parsed and rewritten locally, never executed. Markup stays text; links, scripts and images are not opened.
- Is my document saved or uploaded?
- No. Input, results, root names and filenames stay in this tab and are not remembered between visits. Only safe language and formatting choices may be stored on this device.
- What are the limits?
- Input is limited to 1 MB and output to 2 MB. Processing stops after five seconds. Type generation also allows up to 100 nesting levels and 10,000 values including containers. Large results use a preview; Download keeps the full successful output.
- What does this check?
- Ordinary JavaScript is supported; TypeScript and JSX are not. Choose Module for imports and exports. Minify keeps names and license comments; it does not optimize program logic.
Was this tool helpful?
Only your rating and optional feedback are sent. Your tool input and output are never included.