PrivTab

JavaScript 포매터

JavaScript 정리

브라우저에서 실행 · 업로드 없음

이 도구와 페이지의 안내는 현재 영어로만 제공됩니다. 동작은 똑같으며, 모든 처리는 브라우저에서 이루어집니다.

  • 아무것도 기기 밖으로 나가지 않음
  • 서버의 파일 크기 제한 없음
  • 가입 불필요, 워터마크 없음
  • 무료

How to format JavaScript

  1. Paste your code, open a .js file, or try the example.
  2. Choose the indentation and where braces go.
  3. Copy or download the formatted code.

Good to know

  • Only spacing and line breaks change; the code does exactly the same thing.
  • Short variable names from a minifier stay short: formatting can't bring back the original names.
  • The formatter doesn't check for errors. Code with a syntax error is formatted as well as possible.
  • Formatting is done by js-beautify, a widely used open-source formatter.

자주 묻는 질문

Does it work for JSON and TypeScript?

JSON, yes (the JSON Formatter also checks it). TypeScript mostly formats fine, but type syntax isn't fully understood.

Is my code uploaded?

No. Everything happens in your browser, and the page is blocked from uploading anything.