Sort and group ES module import statements alphabetically, separating external packages from internal relative imports. JS Import Sorter is a free online tool from the ToolsRift JavaScript Tools collection. It runs entirely in your browser — nothing to install, no signup, and your data never leaves your device.
Paste a file that begins with import statements, then click Sort & Group Imports. External packages are grouped first, then internal/relative imports, each sorted A–Z.
Imports are split into two groups: node builtins and external packages first, then internal/relative imports (./, ../, @/), with a blank line separating the groups.
Side-effect imports like import './styles.css' are preserved in their original order and kept together, since their execution order can matter.
No. Only the leading block of import statements is reordered. Everything below the imports is preserved exactly as written.