<!DOCTYPE html>
<html>
<head>
<title>JSON Viewer</title>
<style>
body {
font-family: monospace;
}
</style>
</head>
<body>
<textarea id="json-input" placeholder="Paste JSON here"></textarea>
<button onclick="viewJSON()">View JSON</button>
<pre id="json-output"></pre>
<script>
function viewJSON() {
const jsonInput = document.getElementById('json-input').value;
try {
const jsonData = JSON.parse(jsonInput);
document.getElementById('json-output').innerText = JSON.stringify(jsonData, null, 2);
} catch (error) {
document.getElementById