Discuvr JSON Formatter

Office & Data

CSV to Excel Paste CSV and see it as a spreadsheet instantly, with numbers, dates and IDs typed the way Excel should hold them. Download a clean .xlsx only when you want it. Sign PDF Sign a PDF in your browser - draw, type or upload your signature, place it on any page, add the date, and download the signed copy. The file never leaves your device. Redact Permanently redact PDF, Word, Excel, PowerPoint, text and image files. Matches and boxes are removed from the file itself, not covered up, and the result is checked again before you download it. What is my IP See the public IP address websites see when you connect, whether it is shared (CGNAT) or private, and what else your browser reveals. Case Converter & Line Tools Change text to UPPER, lower, Title or Sentence case, turn names into camelCase or snake_case, and remove duplicate lines or sort a list. Text Compare Paste two versions of a text to see every added, removed and changed line, with the changed words highlighted.

Writing & Proposals

Tone Polish Reformat what you wrote with proper grammar, structure and articulation - in your own voice. One paste, one reply, no chat session. Freelance Proposal Generator Describe a client problem and get a scoped, priced, ready-to-send freelance proposal in seconds.

Legal & Compliance

IP Law Q&A Chatbot Ask questions about Indian IP law - trade marks, patents, copyright, designs and more, with the web search results it used listed above each answer. Patent FER Reply Generator Paste the objections from a First Examination Report to draft a structured reply, or upload a draft for an IP risk review. Government Scheme Eligibility Finder Answer a short set of questions once. Sign in and we save your answers, so you can check which central government schemes you may qualify for without retyping them.

Privacy & Security

Website Security Scan Scan a domain for real, reproducible security weaknesses. Every finding carries the observation behind it and the command to verify it yourself. Image Scrub See exactly what your photo reveals about you - GPS, camera serial, your name - then strip it. Crop, resize, blur faces and convert, all without the image being stored anywhere.

Developer Tools

JSON Formatter Beautify, minify and validate JSON in one paste - with the exact line and column when it will not parse, and a count of what is actually in the document. Python Formatter Reformat Python the way Black would, with the line length and quote handling you choose - and a count of exactly how many lines changed. HTML Viewer Paste HTML and see it rendered live in a sandbox, at phone, tablet or desktop width - with beautify, minify, a console for scripts and a report of what is broken in the markup. IP Subnet Calculator Enter CIDR notation or an IP with a netmask and get the network address, broadcast address, usable host range and total address count instantly. Encode / Decode Encode or decode Base64, Base64URL, URL percent-encoding, HTML entities and hex as you type, with full UTF-8 support. Unix Timestamp Converter Convert a Unix epoch timestamp in seconds, milliseconds, microseconds or nanoseconds to a date in UTC or a major world time zone, and a date back to a timestamp. System Diagram Maker Type arrows like User -> API -> Database and get a laid-out architecture or flow diagram. Fold groups into one box for the big picture, number the steps for a detailed flow.

AI Workbench

AI Playground Compare responses from multiple LLM providers side by side in real time. Bring your own API keys. Agent Playground Experiment with AI agents that use tools - web search, a calculator, URL fetching - across multiple providers.

Learning

Study Buddy An interview-prep coach for top tech jobs, from the first study day to an accepted offer: a plan across DSA, LLD, system design, behavioural and AI-assisted coding, mock interviews, a resume review, an applications tracker and offer comparison.

Everyday Helpers

QR Code Generator Create QR codes from text, URLs, WiFi credentials or contact info - as PNG images or SVG vectors, with the error correction level you choose. Unit Converter Convert between length, weight, temperature, volume, speed, area and energy units instantly - 40+ unit types with instant results. Password Generator Generate a random password with cryptographically secure randomness, tune its length and character types, and see its strength in bits of entropy. Word Counter & Readability Analyzer Count words, characters, sentences and paragraphs, estimate reading time, and score readability - with true character-based counting for Chinese, Japanese, Korean and Thai text. Age / Date Difference Calculator Find someone's exact age, or the exact difference between any two dates - years, months and days, plus the total number of days and weeks. Date Difference Calculator Count the days, weeks, months and working days between two dates, or add and subtract days from a date. Percentage Calculator Calculate X% of Y, what percent one number is of another, percentage increase or decrease between two numbers, or reverse percentage - four common calculations in one tool. SIP Calculator See what a monthly investment grows to, with a yearly step-up, a starting lump sum and inflation, or find the monthly amount a goal needs. BMI Calculator Calculate your Body Mass Index (BMI) from height and weight, in metric or imperial units, classified against the WHO adult categories - underweight, normal, overweight, obese.
Sign in Get started
Nothing stored
All toolsDeveloper Tools

JSON Formatter

Beautify, minify and validate JSON - and when it will not parse, be told exactly where.

Input

0 characters

Output

 

About JSON Formatter

JSON that came out of an API log or a config file is usually one long line, and JSON that will not parse usually fails somewhere you cannot see. This indents it so you can read it, minifies it when you need it small, and when it is broken it tells you the line and column and shows you that line.

What it does

  • Beautify with 2 spaces, 4 spaces or tabs - or minify to the smallest valid form.
  • JSON Lines output: one compact record per line, for logs and stream formats.
  • Precise errors - the message, the line, the column and the surrounding lines.
  • Optionally sort every object's keys, so two documents can be diffed sensibly.
  • Optionally escape non-ASCII to \uXXXX for systems that cannot carry UTF-8.
  • Optionally accept comments and trailing commas, and be told exactly what was removed.
  • Reports the document's shape: keys, objects, arrays, nesting depth and the size saved.

How it works

  1. 1 Paste the JSON, or the thing you hoped was JSON.
  2. 2 Pick beautify, minify or JSON Lines and press Format.
  3. 3 Copy or download the result - or read the error and fix the line it names.

Why the error message matters more than the formatting

Most of the time you are not here to make JSON pretty - you are here because something rejected it and did not say why. The parser reports the line, the column and what it expected, and the tool prints that line with the two around it. A missing comma four hundred lines into a config is a thirty-second fix once you know where it is.

Comments and trailing commas

JSON has never allowed either, but the files people actually hand you - tsconfig, VS Code settings, anything hand-edited - are full of them. Ticking the option strips them before parsing, and the tool then states how many comments and how many commas it removed. It is opt-in and reported precisely because a formatter that quietly alters your document is worse than one that refuses it.

What it does not do

It does not guess at what you meant. Beyond the two removals above, nothing is repaired: an unclosed brace, a single-quoted key or an unquoted key is reported, not rewritten. Sorting keys and re-indenting never reorder an array or change a string. The next section lists the few cases where the output can still differ from what you pasted.

Numbers, duplicate keys and NaN

Your JSON is parsed and written back out, so a few things come back normalised. Numbers are re-printed: 1.50 becomes 1.5, 1E3 becomes 1000.0 and -0 becomes 0, and a decimal with more digits than a 64-bit float can hold is rounded (0.1000000000000000055 becomes 0.1). Whole numbers are kept exactly up to 4,300 digits (longer ones are refused). If an object repeats a key, only the last value is kept, with no warning. NaN, Infinity and -Infinity are accepted and passed through even though standard JSON (RFC 8259) does not allow them, and a number too large for a float, such as 1e400, comes out as Infinity. If any of these matter to the system you are feeding, check for them yourself before trusting a clean result.

Questions

Is my JSON uploaded anywhere or stored?

It is sent to the server to be parsed and sent straight back in the same response. Nothing is written to disk, cached or logged, and the usage record keeps only counts - size, nesting depth, which mode you picked - never the document.

Why does it say my JSON is invalid when my editor accepts it?

Usually comments, trailing commas, single quotes or unquoted keys - all common in config files and none of them legal JSON. Tick "allow comments and trailing commas" for the first two; the others are genuinely invalid and have to be fixed.

Can it handle a large file?

Up to 2,000,000 characters per request; anything longer is refused with its exact length. For files that size a command-line tool such as jq is the better instrument.

What is JSON Lines for?

Log pipelines and streaming loaders read one JSON object per line rather than one big array. Pick it and a top-level array comes back as one compact record per line.

Does sorting keys change my data?

No. Object key order is not meaningful in JSON, and array order - which is meaningful - is never touched. Sorting is there so two versions of the same document can be diffed without the noise.

How do I open this JSON in Excel?

In Excel for Microsoft 365, save it as a .json file and choose Data > Get Data > From File > From JSON. Power Query opens it: a top-level array shows as a List, To Table turns it into a column of Records, and the expand button (two arrows) in the column header splits each key into its own column; expanding a nested array adds one row per item. Power Query needs one valid JSON document, so fix any error here first, where you get the line and column, then save the Beautify or Minify output; JSON Lines output is meant for log tools. This tool does not itself convert JSON to CSV or Excel.

How do I validate or format JSON from the command line?

Python ships a checker: python -m json.tool data.json prints the document with 4-space indents, or stops with a message such as Expecting ',' delimiter: line 3 column 3. With jq installed, jq . data.json pretty-prints and jq empty data.json only checks, printing nothing when the file is valid. Neither accepts comments or trailing commas, so a config file that has them fails there; paste it here and tick "Allow comments and trailing commas" to see what was removed.

What does "Expecting property name enclosed in double quotes" mean?

The parser expected an object key and found something else. Usually the keys use single quotes or none, as in {'name': 'Asha'} copied from Python or JavaScript, which stops at line 1, column 2: JSON needs double quotes around every key and string, and this tool never rewrites quotes, so change them yourself. The same message at a closing brace, as in {"a": 1,}, means a trailing comma; tick "Allow comments and trailing commas" to remove it. Expecting value at True, False or None means Python values: JSON writes true, false and null in lower case. In Python, json.dumps(data) gives valid JSON and print(data) does not. Errors are shown exactly as Python's parser words them, in English, so you can search the message as is.

What does "Extra data" mean?

The parser read one complete JSON value and then found more text after it. Common causes: a JSON Lines (NDJSON) log with one object per line, which stops at line 2, column 1; two documents pasted one after the other; or a // comment after the last closing brace, which "Allow comments and trailing commas" removes. This tool checks one document at a time, so paste a single record, or put the records inside [ ] with a comma between each pair; choosing JSON Lines then writes them back out one per line.