JavaScript formatter
Beautify JavaScript with Prettier, with your choice of indent, line width, semicolons and quote style.
Runs in your browserNothing uploadedWorks offline
Set up for this job. It runs on Code formatter, where every option is there to change.
Loading JavaScript formatterRuns on this device. Nothing is uploaded.
Questions
Does it support JSX and modern syntax?
Yes. It uses Prettier's Babel parser, which reads modern JavaScript, JSX, import and export, and top level await.
Can it make minified code readable?
It restores line breaks and indentation. Names that a minifier shortened, such as a and b, stay short, since the original names are gone.
Is my code uploaded?
No. Prettier runs in this tab and the page sends your code nowhere.
Related tools
All developer toolsDeveloperjs mjs cjsCode formatterFormat HTML, CSS, JavaScript, TypeScript, JSON, Markdown and YAML with Prettier, right in your browser, with indent and quote options.DeveloperBase64 encode and decodeEncode text or any file to Base64 and decode Base64 back to text or the original file, with a URL-safe option.DeveloperBinary to decimalConvert binary numbers of any length to decimal, with hex and octal shown too, exactly and as you type.Developerapplication image videoChecksum verifierDrop a file and paste the published checksum to see if it matches. MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC32 are detected for you.DeveloperChmod calculatorTick read, write and execute boxes or type 755 or rwxr-xr-x, and get the matching octal, symbolic and chmod command, explained.DeveloperCIDR and subnet calculatorType an IP with a prefix or mask to get the network, broadcast, host range, host count, netmask and wildcard. IPv6 works too.