String Utilities Alat telah diperbarui 6 jam yang lalu

Markdown Word Counter

Markdown Word Counter turns a Markdown file into real numbers: words, characters, characters without spaces, reading time, lines, paragraphs, headings, links, images and fenced code blocks. The Markdown is converted to plain text first, so formatting syntax does not inflate the count. Paste, press Count, and read the stats or the raw JSON.

Selalu Gratis Mudah digunakan Hasil seketika Pribadi dan aman

Gunakan Markdown Word Counter

Markdown Word Counter

Count words, characters, reading time, headings, links, images, and code blocks from Markdown.

Input Markdown

Paste Markdown content to analyze
0
Words
0
Characters
0
Chars no spaces
0 min
Reading time
0
Lines
0
Paragraphs
0
Headings
Links
0
Images
0
Code blocks
0%
Word density

Raw JSON

Full stats response
JSON: 2 chars
{}
Counter tip
Use this tool before publishing docs, blogs, changelogs, and README files to estimate content length and structure.
Tautan Alat
Telah disalin ke papan klip.
Bantu Perbaiki Alat Ini

Baca Isi

Pelajari cara kerja alat ini dan kapan harus menggunakannya.

What this counter measures

Paste a Markdown document and this tool reports twelve numbers about it: words, characters, characters without spaces, estimated reading time, lines, paragraphs, headings, links, images, fenced code blocks, and a word-density figure, with the raw JSON response shown underneath. It is built for people who write in Markdown and want a quick structural read before publishing a README, a docs page, a changelog or a blog post.

The count is not a textarea length check. The Markdown is converted to HTML with a GitHub-flavoured Markdown parser, the HTML is stripped back to plain text, and the statistics are calculated on that plain text. That is why the syntax characters you typed do not inflate the character count.

How the count is produced

  1. The Markdown is normalised to Unix line endings.
  2. YAML front matter is removed if the document starts with it, so a title block at the top of a post does not count as body text.
  3. The document is rendered with a GFM converter that strips raw HTML rather than executing it.
  4. Tags are removed, HTML entities are decoded, runs of spaces and tabs are collapsed, and excess blank lines are trimmed.
  5. Words are counted as whitespace-separated tokens in the resulting text; characters, lines and paragraphs are measured from the same text.
  6. Headings, links, images and code fences are counted separately by scanning the raw Markdown, skipping anything inside fenced code.

Count does not run automatically. The small “possible words” figure under the editor is a rough live estimate based on splitting your raw Markdown on whitespace, so it includes syntax tokens. The real figures appear only after you press Count.

The stat cards, explained

Words

Every whitespace-separated token in the plain text counts as a word. Normal prose behaves as you expect. Code and formulas do not: in a fenced block, const x = 1; contributes four tokens, because const, x, = and 1; are each separated by spaces. That is the honest behaviour of a whitespace tokenizer, and it is why a code-heavy README can show more words than its prose suggests.

Characters and characters without spaces

Characters are the length of the plain text, including spaces and line breaks but excluding Markdown syntax, link URLs and image markup. Characters without spaces removes every whitespace character. For a publisher with a hard character budget, the no-spaces figure is the stricter one.

Lines and paragraphs

Lines are counted from the plain text, not from your source file, so a paragraph you wrapped across five source lines reads as one line after conversion. Paragraphs are blocks separated by a blank line, measured on the same converted text.

Headings

Only ATX headings are counted: a line starting with one to six # characters followed by a space. Setext headings, written with a line of === or --- underneath, are not included. Headings inside fenced code blocks are ignored, so a shell comment starting with # inside a fence is not mistaken for a heading.

Links and images

Links are matched from [text](url) patterns and from bare http or https URLs found outside code fences. Images are matched from ![alt](url) patterns outside fences. Reference-style links, defined with [id]: url at the bottom of a file, are not resolved by this scanner.

Code blocks

Each fenced block counts when an opening fence of three or more backticks or tildes is found. Only one number per block is reported; the language tag is not shown and the block's contents are not analysed separately. An unclosed fence still counts as one block.

Reading time

Reading time is the word count divided by 200 words per minute, rounded up, with a floor of one minute. It is a rough estimate for average prose. Dense technical text, tables and code take longer per word, so treat the figure as a lower bound rather than a promise.

Word density

This card is calculated in your browser, not by the server. It divides the word count by the character count and caps the result at 100 percent, so it reflects how long the average word is, not keyword density. A document full of short words scores higher than one with long technical terms. It is not a readability score and not an SEO keyword ratio.

What counts and what does not

ElementCounted in words?Notes
Paragraph textYesNormal prose, including bold and italic content
Heading textYesHeading markers themselves are not counted
Link textYesThe URL is excluded from the text
Bare URLYesA URL written on its own becomes one token
Image alt textNoThe image markup is stripped entirely
Code fence contentsYesCounted as whitespace-separated tokens
YAML front matterNoRemoved before conversion
Markdown syntaxNoHashes, asterisks, backticks and brackets are stripped
Raw HTML tagsNoHTML input is stripped by the converter

How to use it

  1. Open the tool. The editor is focused on Markdown and starts empty.
  2. Paste with the Paste button, or type into the editor. The footer shows the raw input length and the rough possible-word estimate.
  3. Press Count. The button shows a spinner while the request runs.
  4. Read the cards. The raw JSON panel below them shows the exact response, and its badge reports how large that JSON is.
  5. Edit and count again after changes. The cards keep the previous result until the next successful count, so a stale number is possible if you forget to re-run.
  6. Use the trash icon to clear the editor and reset every card.

Why count Markdown rather than plain text

A word processor counts what it displays, and a Markdown file displays syntax. If you paste raw Markdown into a generic counter, every **bold** marker, heading hash and link target is treated as text, which inflates characters and can distort words. Converting first gives you a figure that matches what a reader will actually see on the rendered page. The trade-off is that the tool must know which Markdown flavour you mean, and it assumes GitHub-flavoured Markdown with tables, strikethrough and task lists.

Accuracy, quirks and limits

A few behaviours are worth knowing before you quote a number. The link counter can over-report: a Markdown link containing an absolute URL is matched once by the bracket pattern and again by the bare-URL scan, and image URLs are picked up by the URL scan as well. A document with many absolute links can therefore show nearly twice as many links as it visually contains. The heading counter ignores setext style. The word counter treats symbols as words when they stand alone. Lines reflect converted text, not editor rows.

Input is capped at 200,000 characters. The request is rejected above that limit rather than silently cut. The tool does not count pages, does not detect language, does not score readability, and does not check spelling or links; it is a counter, not a linter. For a link check, use a dedicated validator.

Privacy

Counting happens on the server: the Markdown you submit is sent in a request and returned as a JSON response. Do not paste unpublished drafts under embargo, private keys, customer data or anything else you would not put in a form submission. The tool does not create an account, does not keep a document history, and does not return your text in the response, only the derived numbers and their JSON.

Common mistakes

  • Reading the live estimate as the result. It splits raw Markdown on whitespace; press Count for the real figures.
  • Comparing the word count to a Word document. Word counts vary by tokenizer; code blocks and symbols are the usual source of difference.
  • Thinking word density is a keyword ratio. It is words divided by characters.
  • Expecting image alt text in the count. It is stripped with the image markup.
  • Assuming every heading is counted. Underlined setext headings are not.
  • Editing after counting. The cards do not update themselves.

Frequently Asked Questions

Pertanyaan yang Sering Diajukan

Jawaban singkat atas pertanyaan-pertanyaan yang diajukan pengguna sebelum mempercayai hasilnya.

Yes. Fenced code becomes part of the plain text, so its contents are counted as whitespace-separated tokens. Symbols that stand alone count as words.

Yes. The statistics are calculated server-side, so your document is submitted with the request. Avoid pasting confidential material.

The scanner counts bracket-style links and bare URLs separately, so a link containing an absolute URL can be counted twice, and image URLs can be counted as links.

It is words divided by characters, capped at 100 percent. It measures average word length, not keyword frequency.

Word count divided by 200 words per minute, rounded up, with a minimum of one minute. Technical or code-heavy text usually takes longer.

No. YAML front matter is removed before conversion, and raw HTML is stripped by the Markdown converter rather than treated as text.

Yes, 200,000 characters. Larger submissions are rejected with a validation error.

Komentar (0)

Untuk diskusi pengguna, kasus-kasus khusus, dan tips lanjutan.
Tinggalkan komentar
Komentar Anda akan ditampilkan secara publik setelah dikirim.
Belum ada komentar. Jadilah yang pertama memberikan komentar!
Beritahu Kami!
Laporkan masalah terkait alat ini

Jelaskan masalah yang Anda alami agar kami dapat menyelidikinya dan meningkatkan alat ini.

Apa yang paling membantu
Sertakan data masukan, hasil yang diharapkan, hasil yang sebenarnya, browser/perangkat, serta tangkapan layar jika diperlukan.
Tombol tangkapan layar akan mengambil gambar halaman di peramban dan melampirkan gambar yang dihasilkan ke formulir ini.
Tangkapan layar satu halaman penuh
Direkam di peramban Anda menggunakan newisty.
Belum ada tangkapan layar yang diambil.
Alat Laporan