🎨 JSON Formatter

Format, validate, minify, escape, convert to CSV, and query JSON data.

All formatting and validation happens in your browser. Your data never leaves your device and is not sent to any server.

Format Options

105 chars
Formatted output will appear here...

💡 Examples

Query Path Examples
user.name → Get user's name
items[0] → First item in array
items[-1] → Last item in array
items[*] → All items in array
items[0:3] → First 3 items (slice)
items[0-2] → Items 0 to 2 (range)
[*].name → All names from root array
CSV Conversion
Convert JSON arrays to CSV format. Perfect for importing into spreadsheets or databases.
Escape/Unescape
Escape JSON for embedding in strings or unescape to restore original format.
Sort Keys
Enable "Sort keys" to alphabetically order all object keys in the output.
Tree View
Interactive collapsible view to explore nested JSON structures easily.

About JSON Formatter

JSON (JavaScript Object Notation) is a lightweight data-interchange format. This tool provides powerful features for working with JSON data.

Features:

  • Format: Pretty-print with custom indentation (2/4 spaces, tabs)
  • Minify: Compact JSON by removing whitespace
  • Escape/Unescape: Convert JSON for string embedding
  • CSV Export: Convert JSON arrays to CSV format
  • Query: Extract data using JSON path notation
  • Statistics: Analyze size, depth, objects, arrays, and keys
  • Sort Keys: Alphabetically order object properties
  • Tree View: Interactive collapsible tree for exploring nested JSON

Use cases: API development, configuration files, data analysis, debugging, code generation, data migration