Nutter Tools
Nutter Tools

A free toolbox that runs in your browser. A tool for every job.

Your files never leave your device

Images

  • Convert images
  • Compress images
  • Resize images
  • Crop
  • Watermark

PDF & files

  • Merge PDFs
  • Split a PDF
  • Images to PDF
  • PDF to images
  • Remove photo location

Video & audio

  • Compress video
  • Convert video
  • Video to GIF
  • Convert audio
  • Trim audio

Everyday

  • QR codes
  • Passwords
  • Time zones
  • Unit converter
  • Word count
  • Webcam test

Developer

  • JSON formatter
  • Base64
  • Regex tester
  • Hashes
  • JWT decoder

Site

  • About
  • Contact
  • Settings
  • Privacy
  • Terms
  • Site map
  • llms.txt

Everyday

  • Images
  • Video
  • Audio
  • PDF & files
  • Text
  • QR codes
  • Units & math
  • Time & dates
  • Color
  • Passwords & IDs
  • Device tests
  • Sun & moon

For developers

  • JSON
  • Encoding
  • Regex & cron
  • Web & auth
  • Hashing & encryption
  • Config files
  • Network
  • Browser
  • AI
  • Fake data
© Nutter Toolsnutter.tools
  1. Home
  2. Regex & cron
  3. JavaScript formatter
Your files stay on your device

JavaScript formatter

Pretty-print JavaScript with two spaces, four spaces, or tabs, or minify it to one line, using a string and comment aware scanner rather than a full parser.

This tool is in beta

Still being tested. If a result looks wrong, tell us.

Report a problem

Your JavaScript

51 characters · 1 lines

Paste some JavaScript to see it formatted.

This is a token scanner, not a parser. Strings, template literals (including ${...} expressions), regex literals, and comments are copied through verbatim, and keywords keep their case. Statements that relied on a newline for automatic semicolon insertion after return, throw, break, continue, or yield get an explicit semicolon so the output keeps its meaning. A clean run is a good sign, not a guarantee that the code would parse; exotic syntax may come out imperfect.

Format options

ModeBeautify re-indents; minify strips comments and whitespace
IndentUsed when beautifying; ignored when minifying

Pastes stay under 100,000 characters and about 40,000 tokens. Unterminated strings, templates, regexes, or block comments are refused with the line they start on, never guessed at.

More regex & cron tools

  • JSON formatter
  • Regex tester
  • Semver compare
All regex & cron tools

Was this tool useful?