{"id":8310473,"date":"2025-09-09T11:16:09","date_gmt":"2025-09-09T08:16:09","guid":{"rendered":"https:\/\/elementor.com\/tools\/?p=8310473"},"modified":"2025-09-09T11:42:27","modified_gmt":"2025-09-09T08:42:27","slug":"html-entity-decoder","status":"publish","type":"post","link":"https:\/\/elementor.com\/tools\/html-entity-decoder\/","title":{"rendered":"HTML Entity Decoder"},"content":{"rendered":"\t\t<div data-elementor-type=\"container\" data-elementor-id=\"8310474\" class=\"elementor elementor-8310474\" data-elementor-post-type=\"elementor_library\">\n\t\t\t\t<div class=\"elementor-element elementor-element-23691a2c e-flex e-con-boxed e-con e-parent\" data-id=\"23691a2c\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-37c3711c elementor-widget elementor-widget-html\" data-id=\"37c3711c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\r\n    \/* --- Styles adapted from your provided CSS --- *\/\r\n\r\n    .html-entity-decoder-app {\r\n        width: 100%;\r\n        max-width: 800px;\r\n        \/* Adjusted max-width for a single-box layout *\/\r\n        margin: 0 auto;\r\n        padding: 60px 0 0;\r\n        background: transparent;\r\n        overflow: visible;\r\n        position: relative;\r\n    }\r\n\r\n    .main-content {\r\n        display: flex;\r\n        flex-direction: column;\r\n        \/* Changed to column for a single-box layout *\/\r\n        gap: 20px;\r\n        position: relative;\r\n        align-items: center;\r\n        justify-content: center;\r\n    }\r\n\r\n    .editor-section {\r\n        \/* Replaces input-section for a unified component *\/\r\n        width: 100%;\r\n        min-height: 400px;\r\n        display: flex;\r\n        flex-direction: column;\r\n        background: white;\r\n        border-radius: 8px;\r\n        overflow: hidden;\r\n        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);\r\n    }\r\n\r\n    .section-header {\r\n        background-color: #05047E;\r\n        color: white;\r\n        padding: 12px 20px;\r\n        font-family: 'DM Sans', sans-serif;\r\n        font-weight: 500;\r\n        font-size: 1.125rem;\r\n        display: flex;\r\n        justify-content: space-between;\r\n        align-items: center;\r\n    }\r\n\r\n    .copy-btn {\r\n        background-color: rgb(255, 255, 255);\r\n        color: black;\r\n        border: 1px solid #ddd;\r\n        padding: 6px 12px;\r\n        border-radius: 4px;\r\n        cursor: pointer;\r\n        font-size: 14px;\r\n        display: flex;\r\n        align-items: center;\r\n        gap: 8px;\r\n        transition: background-color 0.2s;\r\n    }\r\n\r\n    .copy-btn:is(:hover, :focus, :focus-visible) {\r\n        background-color: #f6f6f6;\r\n    }\r\n\r\n    .copy-btn svg {\r\n        width: 16px;\r\n        height: 16px;\r\n        fill: #333;\r\n    }\r\n\r\n    .textarea-container {\r\n        flex: 1;\r\n        position: relative;\r\n        background-color: #ffffff;\r\n        border: 1.5px solid #EBEBEB;\r\n        border-top: none;\r\n        border-bottom-left-radius: 8px;\r\n        border-bottom-right-radius: 8px;\r\n    }\r\n\r\n    .line-numbers {\r\n        position: absolute;\r\n        left: 0;\r\n        top: 0;\r\n        width: 40px;\r\n        height: 100%;\r\n        background-color: #f7f7f7;\r\n        border-right: 1.5px solid #EBEBEB;\r\n        padding: 15px 0;\r\n        font-family: 'DM Sans', sans-serif;\r\n        font-size: 12px;\r\n        color: #6c757d;\r\n        text-align: center;\r\n        line-height: 1.5;\r\n        overflow: hidden;\r\n        user-select: none;\r\n    }\r\n\r\n    .code-textarea {\r\n        width: 100%;\r\n        height: 100%;\r\n        border: none;\r\n        outline: none;\r\n        padding: 15px 15px 15px 50px;\r\n        font-family: 'Courier New', monospace;\r\n        font-size: 14px;\r\n        line-height: 1.5;\r\n        background-color: transparent;\r\n        resize: none;\r\n        color: #333;\r\n    }\r\n\r\n    .code-textarea::placeholder {\r\n        color: #adb5bd;\r\n        font-style: italic;\r\n    }\r\n\r\n    .action-buttons-container {\r\n        display: flex;\r\n        gap: 16px;\r\n        align-items: center;\r\n        justify-content: center;\r\n        margin-top: 10px;\r\n        width: 100%;\r\n    }\r\n\r\n    .format-btn {\r\n        background-color: #000;\r\n        color: white;\r\n        border: none;\r\n        padding: 12px 20px;\r\n        cursor: pointer;\r\n        font-size: 1.125rem;\r\n        font-weight: 500;\r\n        transition: all 0.2s;\r\n        min-width: 11rem;\r\n        text-align: center;\r\n        border-radius: 4px;\r\n    }\r\n\r\n    .format-btn:is(:hover, :focus, :focus-visible, :active) {\r\n        background-color: #545454;\r\n    }\r\n\r\n    .reset-btn {\r\n        background: none;\r\n        border: none;\r\n        color: black;\r\n        text-decoration: underline;\r\n        font-size: 1rem;\r\n        cursor: pointer;\r\n        padding: 0;\r\n        transition: color 0.2s;\r\n    }\r\n\r\n    .reset-btn:is(:hover, :focus, :focus-visible, :active) {\r\n        background: none;\r\n        color: #545454;\r\n        text-decoration: underline;\r\n    }\r\n\r\n    .success-message {\r\n        position: fixed;\r\n        top: 20px;\r\n        right: 20px;\r\n        background-color: #28a745;\r\n        color: white;\r\n        padding: 12px 20px;\r\n        border-radius: 4px;\r\n        font-size: 14px;\r\n        opacity: 0;\r\n        transform: translateX(100%);\r\n        transition: all 0.3s ease;\r\n        z-index: 1000;\r\n        pointer-events: none;\r\n    }\r\n\r\n    .success-message.show {\r\n        opacity: 1;\r\n        transform: translateX(0);\r\n    }\r\n\r\n    @media (max-width: 768px) {\r\n        .html-entity-decoder-app {\r\n            padding: 30px 15px 0;\r\n        }\r\n\r\n        .editor-section {\r\n            min-height: 350px;\r\n        }\r\n\r\n        .format-btn {\r\n            font-size: 1rem;\r\n            min-width: 9rem;\r\n        }\r\n    }\r\n<\/style>\r\n\r\n<div class=\"html-entity-decoder-app\">\r\n    <div class=\"main-content\">\r\n        <div class=\"editor-section\">\r\n            <div class=\"section-header\">\r\n                <span>HTML Entity Decoder<\/span>\r\n                <button id=\"copyBtn\" class=\"copy-btn\" title=\"Copy to clipboard\">\r\n                    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"><\/path><\/svg>\r\n                    <span>Copy<\/span>\r\n                <\/button>\r\n            <\/div>\r\n            <div class=\"textarea-container\">\r\n                <div id=\"lineNumbers\" class=\"line-numbers\">1<\/div>\r\n                <textarea id=\"entityInput\" class=\"code-textarea\"\r\n                    placeholder=\"Paste your encoded HTML here... e.g., &lt;p&gt;Hello &amp; welcome!&lt;\/p&gt;\"><\/textarea>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"action-buttons-container\">\r\n            <button id=\"decodeBtn\" class=\"format-btn\">Decode<\/button>\r\n            <button id=\"resetBtn\" class=\"reset-btn\">Clear<\/button>\r\n        <\/div>\r\n    <\/div>\r\n    <div id=\"successMessage\" class=\"success-message\">Copied to clipboard!<\/div>\r\n<\/div>\r\n\r\n<script>\r\n    document.addEventListener('DOMContentLoaded', function () {\r\n        const entityInput = document.getElementById('entityInput');\r\n        const decodeBtn = document.getElementById('decodeBtn');\r\n        const resetBtn = document.getElementById('resetBtn');\r\n        const copyBtn = document.getElementById('copyBtn');\r\n        const successMessage = document.getElementById('successMessage');\r\n        const lineNumbers = document.getElementById('lineNumbers');\r\n\r\n        \/**\r\n         * Decodes HTML entities from a string.\r\n         * It uses the browser's own parser by assigning the string to a temporary\r\n         * element's innerHTML and then retrieving its value.\r\n         * @param {string} encodedString The string containing HTML entities.\r\n         * @returns {string} The decoded string.\r\n         *\/\r\n        const decodeHtmlEntities = (encodedString) => {\r\n            const tempTextArea = document.createElement('textarea');\r\n            tempTextArea.innerHTML = encodedString;\r\n            return tempTextArea.value;\r\n        };\r\n        \r\n        const updateLineNumbers = () => {\r\n            if (!entityInput) return;\r\n            const lineCount = entityInput.value.split('\\n').length;\r\n            const numbers = Array.from({ length: lineCount }, (_, i) => i + 1).join('\\n');\r\n            lineNumbers.innerText = numbers;\r\n        };\r\n        \r\n        \/\/ --- Event Listeners ---\r\n        \r\n        decodeBtn.addEventListener('click', () => {\r\n            const encodedText = entityInput.value;\r\n            if (encodedText) {\r\n                entityInput.value = decodeHtmlEntities(encodedText);\r\n                updateLineNumbers();\r\n            }\r\n        });\r\n\r\n        resetBtn.addEventListener('click', () => {\r\n            entityInput.value = '';\r\n            updateLineNumbers();\r\n            entityInput.focus();\r\n        });\r\n\r\n        copyBtn.addEventListener('click', () => {\r\n            if (entityInput.value === '') return;\r\n\r\n            navigator.clipboard.writeText(entityInput.value).then(() => {\r\n                successMessage.classList.add('show');\r\n                setTimeout(() => {\r\n                    successMessage.classList.remove('show');\r\n                }, 2000);\r\n            }).catch(err => {\r\n                console.error('Failed to copy text: ', err);\r\n            });\r\n        });\r\n        \r\n        entityInput.addEventListener('input', updateLineNumbers);\r\n        entityInput.addEventListener('scroll', () => {\r\n            lineNumbers.scrollTop = entityInput.scrollTop;\r\n        });\r\n        \r\n        \/\/ Initial setup\r\n        updateLineNumbers();\r\n    });\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[22],"tags":[21],"class_list":["post-8310473","post","type-post","status-publish","format-standard","hentry","category-tools","tag-html-css-tools"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HTML Entity Decoder<\/title>\n<meta name=\"description\" content=\"Easily decode HTML entities with our free online HTML Entity Decoder. Convert special characters, named entities, and numeric codes to plain text for your website. Perfect for Elementor users.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/elementor.com\/tools\/html-entity-decoder\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML Entity Decoder\" \/>\n<meta property=\"og:description\" content=\"Easily decode HTML entities with our free online HTML Entity Decoder. Convert special characters, named entities, and numeric codes to plain text for your website. Perfect for Elementor users.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/elementor.com\/tools\/html-entity-decoder\/\" \/>\n<meta property=\"og:site_name\" content=\"Tools\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-09T08:16:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-09T08:42:27+00:00\" \/>\n<meta name=\"author\" content=\"liz@148.red\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"liz@148.red\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/elementor.com\/tools\/html-entity-decoder\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/elementor.com\/tools\/html-entity-decoder\/\"},\"author\":{\"name\":\"liz@148.red\",\"@id\":\"https:\/\/elementor.com\/tools\/#\/schema\/person\/80e8375cb95e6030bc2f897c41c985ac\"},\"headline\":\"HTML Entity Decoder\",\"datePublished\":\"2025-09-09T08:16:09+00:00\",\"dateModified\":\"2025-09-09T08:42:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/elementor.com\/tools\/html-entity-decoder\/\"},\"wordCount\":5,\"keywords\":[\"Html-Css-tools\"],\"articleSection\":[\"tools\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/elementor.com\/tools\/html-entity-decoder\/\",\"url\":\"https:\/\/elementor.com\/tools\/html-entity-decoder\/\",\"name\":\"HTML Entity Decoder\",\"isPartOf\":{\"@id\":\"https:\/\/elementor.com\/tools\/#website\"},\"datePublished\":\"2025-09-09T08:16:09+00:00\",\"dateModified\":\"2025-09-09T08:42:27+00:00\",\"author\":{\"@id\":\"https:\/\/elementor.com\/tools\/#\/schema\/person\/80e8375cb95e6030bc2f897c41c985ac\"},\"description\":\"Easily decode HTML entities with our free online HTML Entity Decoder. Convert special characters, named entities, and numeric codes to plain text for your website. Perfect for Elementor users.\",\"breadcrumb\":{\"@id\":\"https:\/\/elementor.com\/tools\/html-entity-decoder\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/elementor.com\/tools\/html-entity-decoder\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/elementor.com\/tools\/html-entity-decoder\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/elementor.com\/tools\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML Entity Decoder\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/elementor.com\/tools\/#website\",\"url\":\"https:\/\/elementor.com\/tools\/\",\"name\":\"Tools\",\"description\":\"Just another Elementor hosted website ;)\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/elementor.com\/tools\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/elementor.com\/tools\/#\/schema\/person\/80e8375cb95e6030bc2f897c41c985ac\",\"name\":\"liz@148.red\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/63b900d3310bd1ed40162fb27f016e9920ae66fa5be07be5153344329ef7d9d2?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63b900d3310bd1ed40162fb27f016e9920ae66fa5be07be5153344329ef7d9d2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63b900d3310bd1ed40162fb27f016e9920ae66fa5be07be5153344329ef7d9d2?s=96&d=mm&r=g\",\"caption\":\"liz@148.red\"},\"url\":\"https:\/\/elementor.com\/tools\/author\/liz148-red\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML Entity Decoder","description":"Easily decode HTML entities with our free online HTML Entity Decoder. Convert special characters, named entities, and numeric codes to plain text for your website. Perfect for Elementor users.","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:\/\/elementor.com\/tools\/html-entity-decoder\/","og_locale":"en_US","og_type":"article","og_title":"HTML Entity Decoder","og_description":"Easily decode HTML entities with our free online HTML Entity Decoder. Convert special characters, named entities, and numeric codes to plain text for your website. Perfect for Elementor users.","og_url":"https:\/\/elementor.com\/tools\/html-entity-decoder\/","og_site_name":"Tools","article_published_time":"2025-09-09T08:16:09+00:00","article_modified_time":"2025-09-09T08:42:27+00:00","author":"liz@148.red","twitter_card":"summary_large_image","twitter_misc":{"Written by":"liz@148.red","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/elementor.com\/tools\/html-entity-decoder\/#article","isPartOf":{"@id":"https:\/\/elementor.com\/tools\/html-entity-decoder\/"},"author":{"name":"liz@148.red","@id":"https:\/\/elementor.com\/tools\/#\/schema\/person\/80e8375cb95e6030bc2f897c41c985ac"},"headline":"HTML Entity Decoder","datePublished":"2025-09-09T08:16:09+00:00","dateModified":"2025-09-09T08:42:27+00:00","mainEntityOfPage":{"@id":"https:\/\/elementor.com\/tools\/html-entity-decoder\/"},"wordCount":5,"keywords":["Html-Css-tools"],"articleSection":["tools"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/elementor.com\/tools\/html-entity-decoder\/","url":"https:\/\/elementor.com\/tools\/html-entity-decoder\/","name":"HTML Entity Decoder","isPartOf":{"@id":"https:\/\/elementor.com\/tools\/#website"},"datePublished":"2025-09-09T08:16:09+00:00","dateModified":"2025-09-09T08:42:27+00:00","author":{"@id":"https:\/\/elementor.com\/tools\/#\/schema\/person\/80e8375cb95e6030bc2f897c41c985ac"},"description":"Easily decode HTML entities with our free online HTML Entity Decoder. Convert special characters, named entities, and numeric codes to plain text for your website. Perfect for Elementor users.","breadcrumb":{"@id":"https:\/\/elementor.com\/tools\/html-entity-decoder\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/elementor.com\/tools\/html-entity-decoder\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/elementor.com\/tools\/html-entity-decoder\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/elementor.com\/tools\/"},{"@type":"ListItem","position":2,"name":"HTML Entity Decoder"}]},{"@type":"WebSite","@id":"https:\/\/elementor.com\/tools\/#website","url":"https:\/\/elementor.com\/tools\/","name":"Tools","description":"Just another Elementor hosted website ;)","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/elementor.com\/tools\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/elementor.com\/tools\/#\/schema\/person\/80e8375cb95e6030bc2f897c41c985ac","name":"liz@148.red","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/63b900d3310bd1ed40162fb27f016e9920ae66fa5be07be5153344329ef7d9d2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/63b900d3310bd1ed40162fb27f016e9920ae66fa5be07be5153344329ef7d9d2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63b900d3310bd1ed40162fb27f016e9920ae66fa5be07be5153344329ef7d9d2?s=96&d=mm&r=g","caption":"liz@148.red"},"url":"https:\/\/elementor.com\/tools\/author\/liz148-red\/"}]}},"_links":{"self":[{"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/posts\/8310473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/comments?post=8310473"}],"version-history":[{"count":2,"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/posts\/8310473\/revisions"}],"predecessor-version":[{"id":8310478,"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/posts\/8310473\/revisions\/8310478"}],"wp:attachment":[{"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/media?parent=8310473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/categories?post=8310473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/tags?post=8310473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}