{"id":360,"date":"2026-07-15T23:21:38","date_gmt":"2026-07-15T21:21:38","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/?page_id=360"},"modified":"2026-07-16T01:00:35","modified_gmt":"2026-07-15T23:00:35","slug":"json-beautifier","status":"publish","type":"page","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/json-beautifier\/","title":{"rendered":"JSON Beautifier"},"content":{"rendered":"<p>Copy your unformatted JSON into this beautifier to get an instant highlighted and srructured code.<\/p>\n<div class=\"json-tool-container\">\n<div style=\"margin-bottom: 15px;\">\n        <button onclick=\"beautifyJson()\">Beautify<\/button><br \/>\n        <button onclick=\"minifyJson()\">Minify<\/button><br \/>\n        <button onclick=\"copyToClipboard()\" style=\"background-color: var(--text-secondary);\">Copy Output<\/button>\n    <\/div>\n<p>    <textarea id=\"json-input\" placeholder=\"Paste your JSON here...\"><\/textarea><\/p>\n<div id=\"error-msg\" style=\"color: #ff5555; margin: 10px 0; display: none; font-weight: bold;\"><\/div>\n<pre id=\"json-output\" style=\"margin-top: 20px; background: var(--bg-panel); padding: 15px; border-radius: 8px; border: 1px solid var(--border); overflow-x: auto; white-space: pre-wrap; font-family: 'Consolas', monospace;\"><\/pre>\n<\/div>\n<style>\n    \/* Syntax Highlighting Colors *\/\n    .json-key { color: #ff79c6; }       \/* Keys *\/\n    .json-string { color: #f1fa8c; }    \/* Strings *\/\n    .json-number { color: #bd93f9; }    \/* Numbers *\/\n    .json-boolean { color: #8be9fd; }   \/* Booleans *\/\n    .json-null { color: #ffb86c; }      \/* Null *\/\n<\/style>\n<p><script>\n    function syntaxHighlight(json) {\n        if (typeof json != 'string') {\n            json = JSON.stringify(json, undefined, 4);\n        }\n        json = json.replace(\/&\/g, '&amp;').replace(\/<\/g, '&lt;').replace(\/>\/g, '&gt;');\n        return json.replace(\/(\"(\\\\u[a-zA-Z0-9]{4}|\\\\[^u]|[^\\\\\"])*\"(\\s*:)?|\\b(true|false|null)\\b|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)\/g, function (match) {\n            let cls = 'json-number';\n            if (\/^\"\/.test(match)) {\n                if (\/:$\/.test(match)) {\n                    cls = 'json-key';\n                } else {\n                    cls = 'json-string';\n                }\n            } else if (\/true|false\/.test(match)) {\n                cls = 'json-boolean';\n            } else if (\/null\/.test(match)) {\n                cls = 'json-null';\n            }\n            return '<span class=\"' + cls + '\">' + match + '<\/span>';\n        });\n    }<\/p>\n<p>    function beautifyJson() {\n        const input = document.getElementById('json-input').value;\n        const output = document.getElementById('json-output');\n        const error = document.getElementById('error-msg');<\/p>\n<p>        try {\n            const obj = JSON.parse(input);\n            const str = JSON.stringify(obj, null, 4);\n            output.innerHTML = syntaxHighlight(str);\n            error.style.display = 'none';\n        } catch (e) {\n            error.textContent = \"Invalid JSON: \" + e.message;\n            error.style.display = 'block';\n            output.innerHTML = '';\n        }\n    }<\/p>\n<p>    function minifyJson() {\n        const input = document.getElementById('json-input').value;\n        const output = document.getElementById('json-output');\n        try {\n            const obj = JSON.parse(input);\n            const str = JSON.stringify(obj);\n            output.innerHTML = syntaxHighlight(str);\n        } catch (e) {\n            document.getElementById('error-msg').textContent = \"Invalid JSON\";\n            document.getElementById('error-msg').style.display = 'block';\n        }\n    }<\/p>\n<p>    function copyToClipboard() {\n        const text = document.getElementById('json-output').innerText;\n        navigator.clipboard.writeText(text).then(() => {\n            alert('Copied to clipboard!');\n        });\n    }\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Copy your unformatted JSON into this beautifier to get an instant highlighted and srructured code. Beautify Minify Copy Output<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":38,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-tool-base.php","meta":{"footnotes":""},"class_list":["post-360","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JSON Beautifier - Lukas Wojcik - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/json-beautifier\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JSON Beautifier - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"Copy your unformatted JSON into this beautifier to get an instant highlighted and srructured code. Beautify Minify Copy Output\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/json-beautifier\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-15T23:00:35+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/json-beautifier\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/json-beautifier\\\/\",\"name\":\"JSON Beautifier - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"datePublished\":\"2026-07-15T21:21:38+00:00\",\"dateModified\":\"2026-07-15T23:00:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/json-beautifier\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/json-beautifier\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/json-beautifier\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Toolbox\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JSON Beautifier\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"luky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"luky\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JSON Beautifier - Lukas Wojcik - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/json-beautifier\/","og_locale":"en_US","og_type":"article","og_title":"JSON Beautifier - Lukas Wojcik - Blog","og_description":"Copy your unformatted JSON into this beautifier to get an instant highlighted and srructured code. Beautify Minify Copy Output","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/json-beautifier\/","og_site_name":"Lukas Wojcik - Blog","article_modified_time":"2026-07-15T23:00:35+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/json-beautifier\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/json-beautifier\/","name":"JSON Beautifier - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"datePublished":"2026-07-15T21:21:38+00:00","dateModified":"2026-07-15T23:00:35+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/json-beautifier\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/json-beautifier\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/json-beautifier\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Toolbox","item":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/"},{"@type":"ListItem","position":3,"name":"JSON Beautifier"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"luky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"luky"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=360"}],"version-history":[{"count":5,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/360\/revisions"}],"predecessor-version":[{"id":365,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/360\/revisions\/365"}],"up":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/38"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}