How to use Code to Text Ratio Checker
- Copy the page sourceOpen the page in your browser, view its source and copy the complete HTML.
- Paste it into Paste HTMLPaste the markup into the Paste HTML box. Nothing is fetched, so the tool only sees what you paste.
- Run the checkPress Run Code to Text Ratio Checker to get the share of text as a percentage with two decimals.
Common uses
- Compare a lean template with a heavy page builder layout
- Spot pages where markup dwarfs the actual copy
- Check a draft template before it goes live
Frequently asked questions
How do I use Code to Text Ratio Checker?
1. Copy the page source: Open the page in your browser, view its source and copy the complete HTML. 2. Paste it into Paste HTML: Paste the markup into the Paste HTML box. Nothing is fetched, so the tool only sees what you paste. 3. Run the check: Press Run Code to Text Ratio Checker to get the share of text as a percentage with two decimals.
How is the ratio calculated?
The tool removes scripts, styles, comments and the head section, strips the remaining tags, decodes entities and collapses whitespace. It then divides the number of characters of visible text by the number of characters of the full HTML you pasted.
Does inline JavaScript or CSS count as text?
No. The content of script, style, noscript, template and svg blocks and of HTML comments is removed before the text is measured, but it still counts toward the HTML size.
Can it fetch a page from a URL?
No. It works only on the HTML you paste, so content that JavaScript adds later is missing unless you copy the rendered markup from your browser’s developer tools.
What happens to the HTML I paste?
It is sent to the GigaTools server, measured during that request and returned as a private, non-cached result. The tool does not fetch anything and does not save your HTML.