Paste JSON and the tool validates it as you type, then beautifies it with 2- or 4-space indentation, minifies it onto one line, escapes it into a quoted string, or unescapes a quoted string back to plain text. If the JSON is invalid, it shows your browser's parser error instead of a result.
Validation uses the same JSON.parse that JavaScript itself uses, so if the tool accepts your input, any standard JSON parser should too. Common reasons it refuses: a trailing comma after the last item, single quotes instead of double quotes, comments, or unquoted keys. The error text from the browser usually names the problem and its position.
Escape is the step you need when JSON has to sit inside another string, for example in an environment variable, a curl command or a test fixture: quotes become \" and line breaks become \n. Unescape does the reverse when an API or log hands you a JSON string full of backslashes.
Paste your JSON
Put it in the input box, or press Load sample to try the tool. The character count updates as you type.
Choose an action
Beautify, Minify, Escape (string) or Unescape.
Pick indentation
When beautifying, choose 2 spaces or 4 spaces.
Copy the output
The result appears on the right with its length. Press Copy, or read the error message if the input is not valid.
Example: escaping a small object
Input {"name":"Shomoy","active":true} with Escape (string) becomes "{\"name\":\"Shomoy\",\"active\":true}", ready to paste inside quotes in code. Beautify with 2 spaces puts each key on its own line instead, and Minify removes all spaces and line breaks.
এক লাইনের জট পাকানো JSON এখানে পেস্ট করলে সাথে সাথে সুন্দর করে সাজিয়ে দেখায় (২ বা ৪ স্পেস), আবার চাইলে এক লাইনে ছোট (minify) করে দেয়। JSON-এ ভুল থাকলে আউটপুটের জায়গায় ব্রাউজারের এরর মেসেজ দেখায়, তাই কমা বা কোটেশন কোথায় ভুল তা খুঁজে পেতে সুবিধা হয়। কোডের ভেতরে বসানোর জন্য escape আর উল্টোটা unescape-ও করা যায়। সব কাজ আপনার ব্রাউজারেই হয়।
সাধারণত শেষ আইটেমের পরে বাড়তি কমা, সিঙ্গেল কোটেশন বা কমেন্ট থাকলে এমন হয়। এগুলো ঠিক করলে আউটপুট চলে আসবে।
না, সব ব্রাউজারে হয়। তবে শেষ ইনপুটটা এই ব্রাউজারে সেভ থাকে, শেয়ার করা কম্পিউটারে কাজ শেষে Clear চাপুন।
Paste it in. If it parses, formatted output appears; if not, the output box is replaced by an error message from your browser's JSON parser, which usually mentions the position of the problem.
JavaScript object syntax allows single quotes, unquoted keys, comments and trailing commas; JSON does not. Use double quotes for every key and string and remove the extras.
Minify removes whitespace but keeps it as JSON. Escape wraps the whole text in quotes and backslash-escapes the inner quotes and line breaks, turning it into a single string value.
Not at the moment. The dropdown has a tab-style entry, but it produces the same 2-space indentation; choose 2 or 4 spaces.
No. Parsing and formatting run in your browser. Note that your last input is saved in the browser's local storage on this device, so press Clear when you finish with sensitive data on a shared computer.
There is no fixed limit, but very large files can make typing sluggish because the page re-checks the whole input each time it changes.
More like this in Free tools. Need a version built for your business? Ask us.