Accessibility / Reading / Text Readability Grade

The Text Readability Grade bookmarklet estimates the Flesch-Kincaid grade level of selected text or main page content. Counts syllables in words using pattern matching, calculates the grade level based on sentence length and word complexity, and displays an alert with the estimated grade level (lower numbers indicate easier-to-read text). If text is selected, analyzes only the selection; otherwise, analyzes the main element or body text (up to 3000 characters). Useful for assessing content readability.

WCAG SC 3.1.5: Reading Level
Run Text Readability Grade

Test run or drag to
bookmarklets bar to install

javascript:%21function()%7B%22use%20strict%22%3Btry%7Bfunction%20e(e)%7Bif(%21(e%3De.toLowerCase().replace(%2F%5B%5Ea-z%5D%2Fg%2C%22%22)))return%200%3Bif(e.length%3C%3D3)return%201%3Bconst%20t%3D(e%3De.replace(%2F(%3F%3A%5B%5Elaeiouy%5Des%7Ced%7C%5B%5Elaeiouy%5De)%24%2F%2C%22%22).replace(%2F%5Ey%2F%2C%22%22)).match(%2F%5Baeiouy%5D%7B1%2C2%7D%2Fg)%3Breturn%20t%3Ft.length%3A1%7Dfunction%20t(t)%7Bconst%20r%3DMath.max(1%2C(t.match(%2F%5B.%21%3F%5D%2B%5Cs%2Fg)%7C%7C%5B%5D).length%2B1)%2Cn%3Dt.trim().split(%2F%5Cs%2B%2F).filter(Boolean)%2Co%3Dn.reduce((t%2Cr)%3D%3Et%2Be(r)%2C0)%2Ca%3Dn.length%3Breturn%20a%2Fr*.39%2Bo%2Fa*11.8-15.59%7Dlet%20r%3Dwindow.getSelection().toString().trim()%3Bif(%21r)%7Br%3D(document.querySelector(%22main%22)%7C%7Cdocument.body).innerText.replace(%2F%5Cs%2B%2Fg%2C%22%20%22).trim().slice(0%2C3e3)%7Dconst%20n%3Dt(r)%3Balert(%22Estimated%20grade%20level%3A%20%22%2Bn.toFixed(1))%2Cconsole.log(%22%5CnSource%3A%20https%3A%2F%2Fgithub.com%2Falejandrogiga98%2FA11y-Bookmarklets%5CnBookmarklet%20name%3A%20Text%20readability%20grade%5CnAuthor%3A%20alejandrogiga98%5CnLicense%3A%20MIT%20License%5Cn%22)%7Dcatch(o)%7Balert(%22Bookmarklet%20Error%3A%20%22%2Bo.message)%7D%7D()%3B
← Back to all bookmarklets