JavaScript 압축기
파서를 사용해 브라우저에서 JavaScript를 압축합니다. 코드는 실행되지 않습니다.
JSON을 보기 좋게 정리하거나 압축하고 유효성을 검사합니다. 주석, 끝 쉼표, 작은따옴표는 허용되지 않습니다. CSV로 변환하지는 않습니다.
이 도구는 브라우저에서 실행됩니다. 입력값, 파일, 생성된 값은 이 기기에 남습니다. 즐겨찾기와 최근 사용한 도구를 이용하더라도 로컬 저장소에는 도구 이름만 저장되며, 비밀번호나 문서, QR 내용은 절대 저장되지 않습니다. 자세한 내용은 개인정보처리방침을 확인하세요.
이 도구의 자세한 안내(사용법, 예시, 자주 묻는 질문)는 현재 영어로만 제공됩니다.
The JSON Formatter pretty-prints JSON, minifies it, or checks that it parses. Use it when an API response is one long line, or when a file fails and you need the parser’s position. The page uses the browser’s JSON parser. Comments, trailing commas, and single quotes fail. This page does not convert JSON to CSV.
Format turns {"name":"Ada","id":1} into a four-line object: an opening brace, then "name": "Ada", then "id": 1, then a closing brace, with two spaces of indentation. Minify of that pretty form returns {"name":"Ada","id":1}. Validate of the same input says: This JSON is valid. The keys and values do not change.
The input {"a":1,} does not format. The page reports Invalid JSON at position 7, then the browser’s parser message. Position 7 is the character after the comma, where a property name would have to start. Delete the comma before the closing brace.
{"a":1} // no fails at position 8, which is the slash after the object. {'a':1} fails at position 1, because a JSON key must use double quotes. The page does not strip comments or convert quotes. Fix the text, then Format again.
JSON is text for objects, arrays, strings, numbers, true, false, and null. Format and Minify both parse the text and then stringify it again. Format uses two-space indentation. Minify uses no extra space. Validate only parses, and on success it shows the sentence This JSON is valid. An empty box says: Paste JSON to format, minify or validate. A document longer than 750,000 characters is rejected before parsing.
Keys and strings use double quotes. Numbers are plain digits, with an optional fraction or exponent. Trailing commas are not allowed after the last item in an object or an array. Comments, including // and /* */, are not part of JSON.
Single quotes are a JavaScript habit, not JSON. {'a':1} fails. Undefined and functions are not JSON values. A trailing comma in a hand-written file is the most common reason Format fails on an otherwise familiar object.
Pretty print adds line breaks and indentation so a person can see the structure. Minify removes that whitespace so the text is shorter to paste. The data is the same if both operations succeed.
Stringify can change the spelling of a number that JavaScript cannot store exactly, and it drops undefined object values if they appear after a successful parse of a larger script you converted by hand. Standard JSON numbers and strings round-trip. The page does not sort keys.
When the browser reports a position, the message starts with Invalid JSON at position, then the parser text. Count from the start of the pasted text, starting at 0 in the usual parser message, and look at that character. Position 7 in {"a":1,} is the spot after the comma.
If the message has no position, the page still says Invalid JSON and includes the parser text. The box is not rewritten when parsing fails. The previous output stays until a later success, so read the error before you trust the output box.
Parsing and formatting happen in your browser. The JSON is not uploaded to Tools Star Hub and is not saved in local storage. Do not paste secrets you would not want in the page’s memory while the tab is open. Closing the tab or pressing Clear drops the text from the page.
Standard JSON is required: double quotes, no comments, and no trailing commas. A document longer than 750,000 characters is rejected. This formatter does not turn JSON into CSV and does not load a URL. The error text comes from the browser’s parser, so the wording after the position can vary slightly by browser. The position number is the one the parser reports.
See the disclaimer for what these tools do not cover.
파서를 사용해 브라우저에서 JavaScript를 압축합니다. 코드는 실행되지 않습니다.
UTF-8로 텍스트를 Base64로 인코딩하거나 다시 디코딩합니다. 결과는 누구나 디코딩할 수 있어 비밀번호를 숨기지 못합니다. 파일은 지원하지 않습니다.
pre, textarea, script, style 내용을 보존하는 신중한 방식으로 브라우저에서 HTML을 압축합니다.
문자열, URL, 중요한 주석, 의미 있는 공백을 유지하면서 브라우저에서 CSS를 압축합니다.
안전한 난수 소스로 브라우저에서 UUID v4 값을 하나 이상 생성합니다.
encodeURIComponent로 URL 구성 요소를 브라우저에서 인코딩하거나 디코딩합니다.