How to use
- app.jsstyle.css
Paste the code
- app.js (formatted)aligned quotes and indentapp.min.js (minified)no spaces or comments
Format or minify
Choose Format or Minify and paste code into the input pane (you can also open or drop a file; Shift_JIS files are read too).
Leave the language on Auto-detect, which uses the file extension and the content. Pick one manually if it guesses wrong.
When formatting, set indent (2/4 spaces or tab), line width, quotes, semicolons and trailing commas. When minifying, choose how comments are handled, whether to shorten local variable names, and whether to minify the contents of <style> and <script> in HTML.
The result appears on the right. A syntax error shows the line, column and an excerpt, and “Go to error” selects that spot in the input.
Copy or download the result. The extension follows your file, and minified files get .min.
What it does
Seven languages through Prettier
JavaScript (with JSX), TypeScript (with TSX), CSS, SCSS, Less, HTML and Vue (.vue) are formatted by Prettier 3.9.10. Formatting the output again changes nothing (idempotent). The engine for each language is loaded only when needed, so the first view stays light.
Language detected from extension and content
The file extension (.ts, .tsx, .scss, .vue …) wins; for pasted text the content (type annotations, interfaces, $variables, @mixin, HTML tags …) picks the candidates. If the first guess fails to parse, the next one is tried (for example TS after JS).
Errors with line and column; input is never cleared
Syntax errors are reported with line, column and an excerpt, and you can jump to the spot in the input. The engine’s message is shown on screen only and is never sent to notifications or logs.
Minifying that keeps the meaning
JavaScript goes through Terser (top-level names are not renamed). CSS keeps strings, url(), escapes and /*! comments byte for byte and only drops whitespace and comments. HTML keeps the contents of <pre>, <textarea> and elements with an inline white-space rule, attribute values, , and one space between inline elements.
A conservative HTML default
By default only whitespace that does not render is removed (in <head>, around table structure and so on). Removing whitespace around block elements such as <div> and <p> is an opt-in, because it can change the layout if your CSS changes `display`.
Reduction shown; Unicode-safe
Before/after size and the reduction are shown, and you are told when minifying makes the file larger (for example already-minified code). Japanese and other non-ASCII identifiers, comments and strings are left as they are.
Use cases
- Make a one-line snippet from a log or bundle readable for review
- Bring files with mixed styles to one set of rules (indent, quotes, semicolons)
- Minify CSS, JavaScript or HTML for delivery while watching the size reduction
- Check what Prettier would do without installing anything
- Format or minify source you cannot upload anywhere
Supported formats
Input
Output
Capability matrix
| Feature | Support | Notes |
|---|---|---|
| Format JavaScript, JSX, TypeScript, TSX, CSS, SCSS, Less, HTML and Vue | Supported | Prettier 3.9.10; <script lang="ts"> in Vue is formatted too |
| Format options (indent, width, quotes, semicolons, trailing commas) | Supported | — |
| Minify JavaScript (whitespace/comments, shorter local names) | Supported | Terser; top-level names are not renamed |
| Minify CSS | Supported | Whitespace and comments only; no rewriting of numbers, colors or selectors and no rule merging |
| Minify HTML | Partial | Only changes that keep the meaning. <pre> and <textarea> are kept; no renaming, tag omission or quote removal |
| Minify TypeScript, JSX, SCSS, Less or Vue | Not supported | It needs a compile step to strip types or syntax. Convert to JS / CSS first (formatting works) |
| Format JSON, SQL, XML, YAML or Markdown | Not supported | Use JSON Studio, SQL Studio, XML Studio, YAML / TOML Studio or Markdown Studio |
| Obfuscation | Not supported | Local names are shortened, but nothing is done to make code hard to read (such as string encryption). It cannot hide your source |
| Running code, type checking, linting, dead-code detection | Not supported | It only formats what it can parse |
| Reading config files (.prettierrc, EditorConfig) | Not supported | Settings come from the on-screen options only |
| Offline use | Supported | Works without a connection once loaded |
Limits & notes
- Input is limited to 1 million characters. Above 100,000 characters auto-run pauses and you press “Run”.
- Formatting depends on Prettier and JavaScript minifying on Terser, so syntax they do not support yet is reported as a syntax error with its position.
- Language detection is a heuristic. Choose the language manually if it guesses wrong.
- HTML minifying does not interpret CSS, so elements made whitespace-sensitive by an external stylesheet (`white-space: pre`) are not detected; inline style attributes are.
- Anything not minified is left as written (inline <script> with a non-JavaScript type, scripts that cannot be parsed).
- Syntax coloring is approximate (not a parser) and does not affect what you copy or download.
- Formatting and minifying work on a phone, but for long code and side-by-side checks a PC’s wider screen is easier.
Privacy & safety
The code you enter and any files you open are processed only inside your browser. Nothing is uploaded or stored, so confidential source is safe to format or minify. Closing the page clears everything.
FAQ
Is the result the same as Prettier?
Can minifying change how the code behaves?
Can TypeScript be minified?
Does HTML minifying break <pre>?
Does it obfuscate code?
Is my code sent to a server?
Related tools
CSS Analyzer (CSS Studio)
Paste CSS or drop a .css file to see the most specific selectors, CSS custom properties that are defined but never used, var() calls with no definition, every color in use, and !important, repeated declarations and empty rules. This tool only reads; it never changes your input.
Mermaid Studio
Write Mermaid code on the left and the diagram appears on the right. Start from a flowchart, sequence, class or ER template and save SVG or PNG with the scale and background you choose. Rendering happens in your browser; your code is never sent.
HTML/CSS/JavaScript Code Playground
Write HTML, CSS and JavaScript in three editors and press Run to see the result in the preview. console.log output and uncaught errors (with the JavaScript line number) show in the console, and you can export everything as one HTML file. Nothing runs just because you opened the page.
Diff Tool — Text & Code Compare
Paste or drop two versions and see added and removed lines, plus the exact words that changed inside each line. Copy or save the result as a unified patch. Nothing leaves your browser.
UUID / ULID / NanoID / Token Generator
A UUID is ready the moment the page opens. Switch to UUID v7, ULID, NanoID or a random token, generate up to 10,000 at once and save them as .txt, .csv or .json. Paste an existing UUID or ULID to read its embedded time and version.
Regex Tester
Type a pattern and matches light up in the test string instantly. Capture groups, replacement output and what each part of the pattern means are all on one screen — and patterns that would freeze your browser are stopped after one second.
Last updated: