SeriesCalc Logo

SeriesCalc

JSON 프리티피어

미니파이된 JSON을 읽기 쉬운 들여쓰기 형식으로 포맷합니다

정보 입력

계산 결과

JSON을 붙여넣고 포맷 버튼을 클릭하세요

JSON Prettifier formats minified or compact JSON into a human-readable format with proper indentation. This is essential for debugging API responses, reading configuration files, and reviewing JSON data.

The tool validates your JSON and provides clear error messages if the input is malformed, helping you quickly identify syntax issues.

용어 설명

JSON
JavaScript Object Notation의 약자로, 키와 값의 쌍으로 데이터를 표현하는 가벼운 텍스트 기반 데이터 형식입니다. API 통신과 설정 파일에 널리 쓰입니다.
들여쓰기(Indentation)
중첩된 데이터 구조를 사람이 읽기 쉽게 계층별로 공백을 추가해 정렬하는 방식입니다. 보통 2칸 또는 4칸 공백을 사용합니다.

  1. 1

    Paste minified JSON

    Copy your compact, single-line JSON and paste it into the input box.

  2. 2

    Click Format

    Optionally set your preferred indent size, then press the Format button to validate and reformat the JSON.

  3. 3

    View the indented output

    Read the result or copy it for use in code editors, documentation, or logs.

Example 1 — Object with array

Starting from the minified input {"name":"John","scores":[1,2]}, prettifying with a 2-space indent produces a readable multi-line structure:

{
  "name": "John",
  "scores": [
    1,
    2
  ]
}

Example 2 — Nested profile

The compact object {"user":{"name":"Alice","age":30,"active":true}} becomes a clearly indented hierarchy where the nesting level of each property is immediately visible.

Before (minified):

{"name":"John","age":30,"active":true}

After (prettified):

{ "name": "John", "age": 30, "active": true }

Tips:

  • Common causes of invalid JSON: trailing commas, missing quotes around keys, single quotes instead of double quotes.
  • Use 2 spaces for standard formatting, or 4 spaces for more readable output.
  • Prettified JSON is larger in file size but much easier to read and debug.
  • Most code editors have built-in JSON formatting, but this tool is useful for quick one-off formatting.

QWhat does prettifying a JSON do?

Prettifying (also called formatting) converts a compact, single-line JSON string into a multi-line, indented structure. It adds spaces, newlines, and indentation to reveal the hierarchy of objects and arrays, making the data much easier to read and debug without changing its meaning.

QWhat indent size should I choose?

The most common choices are 2 or 4 spaces. Two spaces keeps deeply nested data compact and fits more on screen, while four spaces is more visually separated and common in some code style guides. Choose whichever matches your team's convention—the tool supports any size from 1 to 8 spaces.

QWhat happens if I paste invalid JSON?

The tool parses your input with JSON.parse before formatting. If the JSON is malformed—such as having a trailing comma, missing quotes on keys, or single quotes instead of double quotes—you get a clear error message describing the problem so you can fix it.

QCan it handle very large JSON files?

Yes, in most cases. Formatting is performed entirely in your browser, so there is no server round-trip or size limit. Very large files are processed quickly, though extremely large payloads may take a moment to render in the output box.

QWhy is the key order preserved after prettifying?

JavaScript objects preserve the insertion order of their keys (except for integer-like keys, which are sorted first). Since prettifying only re-adds whitespace and never reorders keys, the output keeps the exact same key sequence as your input—only the formatting changes.

관련 계산기