filemarkr
All ToolsGuides
filemarkr

60+ free developer tools that run entirely in your browser — JSON formatter, JWT decoder, Base64, diff checker, regex tester, hash generator and more. No upload, no sign-up, completely private.

JSON & Data

  • JSON Formatter
  • JSON Minifier
  • JSON Validator
  • JSON to CSV
  • CSV to JSON
  • JSON to YAML

Encode & Decode

  • Base64 Encode / Decode
  • Base64 to Image
  • Image to Base64
  • URL Encode / Decode
  • HTML Entity Encoder
  • JWT Decoder

Text Tools

  • Text Diff Checker
  • Case Converter
  • Word & Character Counter
  • Slug Generator
  • Remove Duplicate Lines
  • Sort Text Lines

Generators

  • UUID Generator
  • Password Generator
  • Lorem Ipsum Generator
  • QR Code Generator
  • Random Number Generator
  • NanoID Generator

Popular Guides

  • How to Format and Pretty-Print JSON (Without Breaking It)
  • How to Minify JSON and Shrink Your API Payloads
  • How to Validate JSON and Pinpoint the Exact Syntax Error
  • How to Convert JSON to CSV for Excel and Google Sheets
  • How to Convert CSV to JSON (With Proper Header Detection)
  • All guides →

Explore

  • All Tools
  • JSON Formatter
  • JWT Decoder
  • Diff Checker
  • UUID Generator

Company

  • About
  • Privacy
  • Terms
  • Sitemap

Our Promise

  • 100% in your browser
  • Zero uploads
  • No sign-up, always free

© 2026 filemarkr. Designed & developed by Naved Naik.  All processing happens locally in your browser.

All guides

Text Tools

How to Count Words, Characters and Reading Time Accurately

Count words, characters, sentences, lines and reading time as you type, and learn the edge cases that make accurate counting harder than it looks.

Try the toolWord & Character Counter →

The problem: limits are everywhere

Meta descriptions get truncated around 155 characters. A tweet caps at 280. An SMS message splits at 160. A "2,000-word article" brief is a real deliverable, and your essay has a word target. In every one of these cases you need a fast, accurate count, and the number your word processor shows does not always match the number the other system will enforce.

How counting works, and where it gets tricky

Counting sounds trivial: split on spaces and count the pieces. In practice, each metric hides an edge case.

Words

The standard approach is to trim the text, split on runs of whitespace, and count non-empty tokens:

const text = "Hello,   world! This is a test.";
const words = text.trim().split(/\s+/).filter(Boolean).length; // 6

Collapsing \s+ into a single delimiter is what stops double spaces and line breaks from inflating the count.

Characters

Character counts come in two flavors, with and without spaces, and both can disagree with what you expect once emoji or accents appear:

"café".length;    // 4 or 5, depending on how é is encoded
"😀".length;       // 2 — one emoji, two UTF-16 code units
[..."😀"].length;  // 1 — spread iterates code points

JavaScript's .length counts UTF-16 code units, not human-visible characters. For anything user-facing, iterate with the spread operator or Intl.Segmenter to count actual glyphs.

Sentences, lines and reading time

const sentences = text.split(/[.!?]+/).filter(s => s.trim()).length;
const lines = text.split(/\r\n|\r|\n/).length;
const minutes = Math.ceil(words / 200); // about 200 words per minute

Reading time is an estimate: 200 to 250 words per minute is the usual range for adult silent reading.

A practical walkthrough

Suppose you are writing a meta description and need it under 155 characters. Paste your draft into the Word & Character Counter and watch the character count update as you trim. Because it counts live as you type, you can tighten a sentence and immediately see whether you are under the limit, with no submit button and no round trip to a server.

Common pitfalls

  • Emoji and flags. A flag emoji is several code points glued together; naive length counts will overcount. Segment by grapheme if precision matters.
  • CJK text. Chinese, Japanese and Korean often are not space-separated, so whitespace splitting undercounts words dramatically. Character count is the more meaningful metric there.
  • Hyphenated and contracted words. Is state-of-the-art one word or four? Is don't one? Pick a rule and apply it consistently; most counters treat both as single tokens.
  • Trailing whitespace. A stray newline at the end of a paste can add a phantom line. Trimming first avoids it.

Related tools

If you are counting to hit an SEO limit, pair this with the Meta Tag Generator to build the final tags. And for cleaning up messy pastes before counting, Remove Line Breaks flattens hard-wrapped text into single lines.

Conclusion

A word counter is only as trustworthy as its handling of the edge cases: Unicode, whitespace, and sentence boundaries. Knowing where the naive approach breaks lets you trust the number. The Word & Character Counter tracks words, characters, sentences, lines and reading time live in your browser, with nothing sent anywhere.

More guides

How to Format and Pretty-Print JSON (Without Breaking It)

Read

How to Minify JSON and Shrink Your API Payloads

Read

How to Validate JSON and Pinpoint the Exact Syntax Error

Read

How to Convert JSON to CSV for Excel and Google Sheets

Read