{"id":8310721,"date":"2025-09-12T05:20:28","date_gmt":"2025-09-12T02:20:28","guid":{"rendered":"https:\/\/elementor.com\/tools\/?p=8310721"},"modified":"2025-09-12T05:36:12","modified_gmt":"2025-09-12T02:36:12","slug":"text-analyzer","status":"publish","type":"post","link":"https:\/\/elementor.com\/tools\/text-analyzer\/","title":{"rendered":"Text Analyzer"},"content":{"rendered":"\t\t<div data-elementor-type=\"container\" data-elementor-id=\"8310716\" class=\"elementor elementor-8310716\" 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 reference --- *\/\r\n    .html-viewer-app { \/* Renamed for this tool: .text-analyzer-app *\/\r\n        width: 100%;\r\n        max-width: 900px; \/* Adjusted for a single-column 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; \/* Changed to column for the single box layout *\/\r\n        gap: 20px;\r\n        align-items: center;\r\n        justify-content: center;\r\n    }\r\n\r\n    .input-section {\r\n        width: 100%;\r\n        flex: 1;\r\n        min-width: 0;\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: 400;\r\n        font-size: 1.125rem;\r\n    }\r\n\r\n    .textarea-container {\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    .code-textarea { \/* Re-used for the text input *\/\r\n        width: 100%;\r\n        height: 250px;\r\n        border: none;\r\n        outline: none;\r\n        padding: 15px;\r\n        font-family: 'Helvetica Neue', Arial, sans-serif; \/* Changed font for readability *\/\r\n        font-size: 16px;\r\n        line-height: 1.6;\r\n        background-color: transparent;\r\n        resize: vertical;\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    .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        margin-top: 15px;\r\n        transition: color 0.2s;\r\n        align-self: flex-end; \/* Aligns button to the right *\/\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    \/* --- New Styles for the Text Analyzer Results --- *\/\r\n    .analysis-results {\r\n        display: grid;\r\n        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));\r\n        gap: 15px;\r\n        width: 100%;\r\n        padding: 20px;\r\n        background: #f9f9f9;\r\n        border: 1.5px solid #EBEBEB;\r\n        border-radius: 8px;\r\n        margin-top: 10px;\r\n    }\r\n    \r\n    .stat-card {\r\n        background-color: #fff;\r\n        border-radius: 6px;\r\n        padding: 15px;\r\n        text-align: center;\r\n        box-shadow: 0 2px 5px rgba(0,0,0,0.05);\r\n        display: flex;\r\n        flex-direction: column;\r\n        justify-content: center;\r\n        align-items: center;\r\n    }\r\n\r\n    .stat-card .count {\r\n        font-size: 2rem;\r\n        font-weight: 600;\r\n        color: #05047E;\r\n        line-height: 1.1;\r\n    }\r\n    \r\n    .stat-card .label {\r\n        font-size: 0.9rem;\r\n        color: #6c757d;\r\n        margin-top: 5px;\r\n    }\r\n\r\n    @media (max-width: 768px) {\r\n        .html-viewer-app {\r\n            padding: 20px 0 0;\r\n        }\r\n        .analysis-results {\r\n            grid-template-columns: repeat(2, 1fr);\r\n        }\r\n        .stat-card .count {\r\n            font-size: 1.75rem;\r\n        }\r\n    }\r\n<\/style>\r\n\r\n<div class=\"html-viewer-app text-analyzer-app\">\r\n    <div class=\"main-content\">\r\n        \r\n        <!-- Input Section -->\r\n        <div class=\"input-section\">\r\n            <div class=\"section-header\">Text To Analyze<\/div>\r\n            <div class=\"textarea-container\">\r\n                <textarea id=\"textInput\" class=\"code-textarea\" placeholder=\"Paste or type your text here...\"><\/textarea>\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <!-- Results Section -->\r\n        <div class=\"analysis-results\">\r\n            <div class=\"stat-card\">\r\n                <span id=\"wordCount\" class=\"count\">0<\/span>\r\n                <span class=\"label\">Words<\/span>\r\n            <\/div>\r\n            <div class=\"stat-card\">\r\n                <span id=\"charCount\" class=\"count\">0<\/span>\r\n                <span class=\"label\">Characters<\/span>\r\n            <\/div>\r\n            <div class=\"stat-card\">\r\n                <span id=\"sentenceCount\" class=\"count\">0<\/span>\r\n                <span class=\"label\">Sentences<\/span>\r\n            <\/div>\r\n            <div class=\"stat-card\">\r\n                <span id=\"paragraphCount\" class=\"count\">0<\/span>\r\n                <span class=\"label\">Paragraphs<\/span>\r\n            <\/div>\r\n            <div class=\"stat-card\">\r\n                <span id=\"readingTime\" class=\"count\">0<\/span>\r\n                <span class=\"label\">Reading Time<\/span>\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <!-- Controls -->\r\n        <button id=\"clearBtn\" class=\"reset-btn\">Clear All Text<\/button>\r\n\r\n    <\/div>\r\n<\/div>\r\n\r\n<script>\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n    \/\/ Get references to DOM elements\r\n    const textInput = document.getElementById('textInput');\r\n    const wordCountEl = document.getElementById('wordCount');\r\n    const charCountEl = document.getElementById('charCount');\r\n    const sentenceCountEl = document.getElementById('sentenceCount');\r\n    const paragraphCountEl = document.getElementById('paragraphCount');\r\n    const readingTimeEl = document.getElementById('readingTime');\r\n    const clearBtn = document.getElementById('clearBtn');\r\n\r\n    \/\/ Function to perform the text analysis\r\n    const analyzeText = () => {\r\n        const text = textInput.value;\r\n\r\n        \/\/ 1. Character Count\r\n        const charCount = text.length;\r\n        charCountEl.textContent = charCount;\r\n\r\n        \/\/ 2. Word Count (using regex to handle various whitespace)\r\n        const words = text.match(\/\\b\\w+\\b\/g) || [];\r\n        const wordCount = words.length;\r\n        wordCountEl.textContent = wordCount;\r\n\r\n        \/\/ 3. Sentence Count (handles multiple terminators like \"!!!\")\r\n        const sentences = text.match(\/[^.!?]+[.!?]+\/g) || [];\r\n        sentenceCountEl.textContent = sentences.length;\r\n\r\n        \/\/ 4. Paragraph Count (splits by new lines, filters out empty lines)\r\n        const paragraphs = text.split(\/\\n+\/).filter(p => p.trim().length > 0) || [];\r\n        paragraphCountEl.textContent = paragraphs.length;\r\n\r\n        \/\/ 5. Reading Time (based on an average of 225 words per minute)\r\n        const wpm = 225;\r\n        const readingTime = Math.ceil(wordCount \/ wpm);\r\n        const readingTimeText = readingTime > 1 ? `${readingTime} mins` : `${readingTime} min`;\r\n        readingTimeEl.textContent = readingTimeText;\r\n    };\r\n\r\n    \/\/ Function to clear the input and reset the stats\r\n    const clearAll = () => {\r\n        textInput.value = '';\r\n        analyzeText(); \/\/ Re-run analysis to set counters to 0\r\n    };\r\n\r\n    \/\/ Event Listeners\r\n    textInput.addEventListener('input', analyzeText);\r\n    clearBtn.addEventListener('click', clearAll);\r\n\r\n    \/\/ Initial analysis on page load (to set initial state)\r\n    analyzeText();\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-8310721","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>Text Analyzer<\/title>\n<meta name=\"description\" content=\"Improve your website copy with the Elementor Text Analyzer. Get instant insights on readability, keyword density, grammar, and more to enhance your content&#039;s performance.\" \/>\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\/text-analyzer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Text Analyzer\" \/>\n<meta property=\"og:description\" content=\"Improve your website copy with the Elementor Text Analyzer. Get instant insights on readability, keyword density, grammar, and more to enhance your content&#039;s performance.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/elementor.com\/tools\/text-analyzer\/\" \/>\n<meta property=\"og:site_name\" content=\"Tools\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-12T02:20:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-12T02:36:12+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\/text-analyzer\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/elementor.com\/tools\/text-analyzer\/\"},\"author\":{\"name\":\"liz@148.red\",\"@id\":\"https:\/\/elementor.com\/tools\/#\/schema\/person\/80e8375cb95e6030bc2f897c41c985ac\"},\"headline\":\"Text Analyzer\",\"datePublished\":\"2025-09-12T02:20:28+00:00\",\"dateModified\":\"2025-09-12T02:36:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/elementor.com\/tools\/text-analyzer\/\"},\"wordCount\":4,\"keywords\":[\"Html-Css-tools\"],\"articleSection\":[\"tools\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/elementor.com\/tools\/text-analyzer\/\",\"url\":\"https:\/\/elementor.com\/tools\/text-analyzer\/\",\"name\":\"Text Analyzer\",\"isPartOf\":{\"@id\":\"https:\/\/elementor.com\/tools\/#website\"},\"datePublished\":\"2025-09-12T02:20:28+00:00\",\"dateModified\":\"2025-09-12T02:36:12+00:00\",\"author\":{\"@id\":\"https:\/\/elementor.com\/tools\/#\/schema\/person\/80e8375cb95e6030bc2f897c41c985ac\"},\"description\":\"Improve your website copy with the Elementor Text Analyzer. Get instant insights on readability, keyword density, grammar, and more to enhance your content's performance.\",\"breadcrumb\":{\"@id\":\"https:\/\/elementor.com\/tools\/text-analyzer\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/elementor.com\/tools\/text-analyzer\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/elementor.com\/tools\/text-analyzer\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/elementor.com\/tools\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Text Analyzer\"}]},{\"@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":"Text Analyzer","description":"Improve your website copy with the Elementor Text Analyzer. Get instant insights on readability, keyword density, grammar, and more to enhance your content's performance.","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\/text-analyzer\/","og_locale":"en_US","og_type":"article","og_title":"Text Analyzer","og_description":"Improve your website copy with the Elementor Text Analyzer. Get instant insights on readability, keyword density, grammar, and more to enhance your content's performance.","og_url":"https:\/\/elementor.com\/tools\/text-analyzer\/","og_site_name":"Tools","article_published_time":"2025-09-12T02:20:28+00:00","article_modified_time":"2025-09-12T02:36:12+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\/text-analyzer\/#article","isPartOf":{"@id":"https:\/\/elementor.com\/tools\/text-analyzer\/"},"author":{"name":"liz@148.red","@id":"https:\/\/elementor.com\/tools\/#\/schema\/person\/80e8375cb95e6030bc2f897c41c985ac"},"headline":"Text Analyzer","datePublished":"2025-09-12T02:20:28+00:00","dateModified":"2025-09-12T02:36:12+00:00","mainEntityOfPage":{"@id":"https:\/\/elementor.com\/tools\/text-analyzer\/"},"wordCount":4,"keywords":["Html-Css-tools"],"articleSection":["tools"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/elementor.com\/tools\/text-analyzer\/","url":"https:\/\/elementor.com\/tools\/text-analyzer\/","name":"Text Analyzer","isPartOf":{"@id":"https:\/\/elementor.com\/tools\/#website"},"datePublished":"2025-09-12T02:20:28+00:00","dateModified":"2025-09-12T02:36:12+00:00","author":{"@id":"https:\/\/elementor.com\/tools\/#\/schema\/person\/80e8375cb95e6030bc2f897c41c985ac"},"description":"Improve your website copy with the Elementor Text Analyzer. Get instant insights on readability, keyword density, grammar, and more to enhance your content's performance.","breadcrumb":{"@id":"https:\/\/elementor.com\/tools\/text-analyzer\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/elementor.com\/tools\/text-analyzer\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/elementor.com\/tools\/text-analyzer\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/elementor.com\/tools\/"},{"@type":"ListItem","position":2,"name":"Text Analyzer"}]},{"@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\/8310721","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=8310721"}],"version-history":[{"count":1,"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/posts\/8310721\/revisions"}],"predecessor-version":[{"id":8310724,"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/posts\/8310721\/revisions\/8310724"}],"wp:attachment":[{"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/media?parent=8310721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/categories?post=8310721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elementor.com\/tools\/wp-json\/wp\/v2\/tags?post=8310721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}